Baccou Bonneville Blogs Eclipse Blog Process Improvement Blog Java Blog Web Design Blog Miscellaneous .NET Blog

12/05/05

English (US)   How to use QuantumDB - an SQL Eclipse Plug-in - on a MySQL database  -  Categories: Eclipse plug-ins  -  @ 10:32:45 pm

DatabaseQuatumDB is a SQL plug-in for Eclipse. It works for a lot of databases included MySQL, HSQLDB, IBM Informix, Oracle, PostgreSQL, Sybase...

The goal of this blog note is to discover how to install and use QuantumDB on a MySQL database.

[More:]

QuantumDB installation

This is how to proceed:

  1. Download QuantumDB Eclipse plug-in. Uncompress the zip under c:\eclipse as usual.

  2. Download MySQL Connector/J 3.1, the JDBC connector for MySQL database. Uncompress the zip under c:\Program files\mysql-jconnector.

  3. Start (or restart) your Eclipse and open the QuantumDB Perspective using Window | Open Perspective | Other | QuantumDB.

  4. In the Database Bookmarks view, right click and choose New Bookmark.

  5. Click on the Add driver button. Click on Add External JAR. Choose c:\Program files\mysql-connectorj\mysql-connector-java-3.1.12-bin.jar. Click on the Browse button and choose com.mysql.jdbc.Driver. Click on the Finish button. Click on Next.

  6. Enter the userid, the password and the database name of your MySQL database. Click on Next.

  7. Enter a name for the Bookmark (for example, the name of the database followed by db).

  8. Right click on the recently created bookmark and choose Connect.

QuantumDB usage

On the following screenshot, we see the Database Bookmarks view:

Database Bookmarks

In the Quantum SQL Query Editor, you can type any SQL command:

Quantum SQL Query Editor

In the Quantum Table View, you can view some tables and you can insert, update or delete rows:

Quatum Table View

There is one drawback on this view: when you insert, update or delete a row you must explicitely click on the refresh button to see your change in the view :-(.

And finally, in the resource view, you can edit an .sql file with Quatum Editor (Syntax Highlighting). You can also right click on a .sql file and choose Quatum | Execute against to run the SQL instructions contained in this file against a particular database.

About UTF-8

If your database is in UTF-8, you will probably have the following kine of error:

SQL Exception
Data truncation: Data truncated for column

SQL State: 01004
Error Code: 0

To avoid such errors, right click on your bookmark and change the URL to the following:

jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=UTF-8

To conclude, QuatumDB is a good Eclipse plug-in to manage a database.

9 comments

Comments:

Comment from: Dave Phillips [Visitor]
This is all nice, and I would really like to use QuantumDB, but I've followed the instructions above and can't get past step 3. QuantumDB is not listed under Window | Open Perspective | Other, and yes, I have restarted Eclipse.
PermalinkPermalink 12/28/05 @ 20:09
Comment from: Serge Baccou [Member] Email · http://www.baccoubonneville.com
Do you have a QuantumDB entry in Window | Preferences? If not, you may have not uncompress the zip file in the correct directory. You must have a directory named com.quantum.Quantum_2.4.5 in the plugins directory of eclipse.
PermalinkPermalink 12/30/05 @ 08:02
Comment from: yatin [Visitor]
if u have done it all correctly then go to : help -> software update -> manage config. -> third tab from left ; there enable quantum db plugins.
PermalinkPermalink 01/05/06 @ 14:34
Comment from: Alexandre Jeronne [Visitor] Email
Dave, you may also need to add GEF
(Graphical Editing Framework) and EMF
(Eclipse Modeling Framework) plugins in
order to get QuantumDB in "other".
PermalinkPermalink 08/21/06 @ 15:47
Comment from: Andrew McGregor [Visitor] Email
For those of us who need very clear instructions, here is how to get the GEF and MEF packages (which I needed to get the Quantum DB 3.0.1 going on Eclipse 3.2).

- Help->Software Updates->Find And Install
- Choose "Search for New Features to Add" and select "Next"
- Tick "Callisto Discovery Site" and select "finish"
- Select a mirror. I just stayed with the first one
- Expand the "Callisto Discovery Site" and "Graphical Editors and Frameworks" and "Models and Model Development" and tick "GEF" and "MEF" and select "Finish"
- Then it asks if you want to restart. Say yes and then the QuantumDB perspective can be opened.
PermalinkPermalink 08/23/06 @ 05:28
Comment from: Andreas Bolm [Visitor] Email · http://www.aquila-soft.de
For Ubuntu users using MySQL 4.1 prior, upgrading to MySQL 5.0.x. and having 'java.net.Socket Exception' trouble now.

Edit your /etc/mysql/my.cnf at:

#MY.CNF - SNIP START#
bind-address 127.0.0.1 #uncomment this line
#skip-networking #commnent this line out
#MY.CNF - SNIP END#

Restart your mysqld in order to able to use Quantum DB Bookmarks. Everything works fine now. (server and clients on the same machine assumed, for clients on different hosts use range pattern like xx.xx.xx.xx - xx.xx.xx.xx)

Note: You can use either the old 3.1 J/Connector or the new one 5.0.4 (version as of writing this text) for conneting to your MySQL 5 server.

Good Luck
PermalinkPermalink 11/03/06 @ 03:41
Comment from: Mark Puttnam [Visitor] Email
For people starting from a clean slate (no eclipse). Try using easyeclipse.org. I have the lamp version of easyeclipse which had QuantumDB already installed. I just had to follow the above instructions to add the driver for mysql.
PermalinkPermalink 12/19/06 @ 11:20
Comment from: Andy Bold [Visitor] Email
Nice instructions - thanks!

A note for EasyEclipse users: I am using EasyEclipse for Python version 1.2.1.3 which does not have the QuantumDB plugin pre-installed.

After downloading the EasyEclipse packaged QuantmDB plugin from the EasyEclipse site I installed it and restarted Eclipse. After installation I found that the 5.1 J/Connector from MySQL does not work. For now stick to the 5.0 series.
PermalinkPermalink 06/13/07 @ 10:48
Comment from: joe [Visitor] Email
i have just installed db quantum but i've become te following connect error sqlstate 08S01
help please!!!!!
PermalinkPermalink 10/01/07 @ 15:12

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Pingbacks:

No Pingbacks for this post yet...

powered by
b2evolution

Credits: blog software | web hosting | monetize