QuantumDb Configuration

QuantumDb is an Eclipse plugin that lets you view a database. This is a quick start guide.

Download and Install

  1. Download GEF (a required package) from here
  2. Download QuantumDb from here
  3. Open the GEF zip file and extract just the plugins and features directories directly into you eclipse installation (c:\eclipse)
  4. Open the QuantumDb zip file and extract just the plugins and features directories directly into your eclipse installation (c:\eclipse)
  5. Restart Eclipse

Start your Database

This example assumes hypersonic is running with the following startup script:
org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

In our examples, we created a folder called database under the installation directory of hypersonic, so the full folder name is:

Assuming java is in your classpath, the following command will start hypersonic:
java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

JPA in JSE Settings

    <persistence-unit name="examplePersistenceUnit" 
            <property name="hibernate.show_sql" value="false" />
            <property name="hibernate.format_sql" value="false" />
            <property name="hibernate.connection.driver_class" 
                      value="org.hsqldb.jdbcDriver" />
            <property name="hibernate.connection.url" 
                      value="jdbc:hsqldb:hsql://localhost/xdb" />
            <property name="hibernate.connection.username" value="sa" />
            <property name="hibernate.dialect" 
                      value="org.hibernate.dialect.HSQLDialect" />
            <property name="hibernate.hbm2ddl.auto" value="create" />

JPA in JEE Settings

This assumes you are using the JBoss Embedded container.

<?xml version="1.0" encoding="UTF-8"?>
   <persistence-unit name="custdb">
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

And the additions to embedded-jboss-bean.xml:
   <bean name="HypersonicLocalServerDSBootstrap" 
      <property name="driverClass">org.hsqldb.jdbcDriver</property>
      <property name="connectionURL">jdbc:hsqldb:hsql://localhost/xdb</property>
      <property name="userName">sa</property>
      <property name="jndiName">java:/HypersonicLocalServerDS</property>
      <property name="minSize">0</property>
      <property name="maxSize">10</property>
      <property name="blockingTimeout">1000</property>
      <property name="idleTimeout">100000</property>
      <property name="transactionManager">
          <inject bean="TransactionManager"/>
      <property name="cachedConnectionManager">
          <inject bean="CachedConnectionManager"/>
      <property name="initialContextProperties">
          <inject bean="InitialContextProperties"/>
   <bean name="HypersonicLocalServerDS" class="java.lang.Object">
      <constructor factoryMethod="getDatasource">
         <factory bean="HypersonicLocalServerDSBootstrap"/>

Using the Perspective

Now that everything is setup, you'll need to open the perspective and form a connection to the database.

  1. Click the Open Perspective button and select Other
  2. Select Quantum DB and click OK
  3. Right-click in Database Bookmarks pane and select New Bookmark...
  4. Click on the Add Driver button
  5. Click on Add External Jar...
  6. Find hsqldb.jar (c:\libs\hsqldb\lib\hsqldb.jar) and click Open
  7. Click on Browse...
  8. Select org.hsqldb.jdbcDriver and click ok
  9. Click on Finish
  10. Select the driver you just added (it is probably the first in the list but look in the JDBC Driver Name column for org.hsqldb.jdbcDriver
  11. Click Next
  12. In the Userid field, enter sa
  13. Leave the Password field blank
  14. Leave Prompt for Password unselected
  15. In the JDBC URL filed, enter jdbc:hsqldb:hsql://localhost/xdb
  16. Name your bookmark HypersonicLocalServer and click Finish
  17. Double-click on you new HypersonicLocalServer Bookmark
  18. Expand PUBLIC
  19. Expand Tables

At this point you can experiment with the plugin.