12/05/05
How to use QuantumDB - an SQL Eclipse Plug-in - on a MySQL database -
Categories: Eclipse plug-ins -
Serge Baccou
@ 10:32:45 pm
QuatumDB 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.
QuantumDB installation
This is how to proceed:
- Download QuantumDB Eclipse plug-in. Uncompress the zip under c:\eclipse as usual.
- Download MySQL Connector/J 3.1, the JDBC connector for MySQL database. Uncompress the zip under c:\Program files\mysql-jconnector.
- Start (or restart) your Eclipse and open the QuantumDB Perspective using Window | Open Perspective | Other | QuantumDB.
- In the Database Bookmarks view, right click and choose New Bookmark.
- 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.
- Enter the userid, the password and the database name of your MySQL database. Click on Next.
- Enter a name for the Bookmark (for example, the name of the database followed by db).
- Right click on the recently created bookmark and choose Connect.
QuantumDB usage
On the following screenshot, we see the Database Bookmarks view:

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

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

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 columnSQL 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.
Comments:
(Graphical Editing Framework) and EMF
(Eclipse Modeling Framework) plugins in
order to get QuantumDB in "other".
- 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.
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
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.
help please!!!!!
Leave a comment:
Pingbacks:
No Pingbacks for this post yet...