- Download Derby 10.0 from:
- Extract the downloaded file to your file system. It is
not necessary to configure the Derby server as we will be using the
embedded driver which creates a database directly in the file system.
Connect to Derby using DTP
Please note that DTP currently only allows one Derby connection per Eclipse session. The Derby embedded JDBC driver has special
requirements when closing a connection that have yet to be implemented in DTP.
Therefore, it is recommended that users do not use the test connection button
in the connection configuration UI as this will create the only allowed connection
and the user will need to restart Eclipse in order to reconnect and view the
database objects in the Data Source Explorer.
To configure a connection to a Derby database:
- In the Data Source Explorer, right-click on the Databases
node and select the New… menu item.
- In the resulting dialog select the SQL Model-JDBC
Connection profile type and click Next.
- Enter a connection name and click Next.
- Click the “…” button and click the Add… button in the
- Now select “Derby Embedded JDBC Driver for Derby 10.0” from the Available Driver Templates list and click OK.
- In the “Provider Driver Details” dialog, edit the “Driver
File” specified so that it points to a valid location of the derby.jar
file. Click OK.
- Click OK again on the Available Driver Definitions dialog.
- In the wizard select “Derby Embedded JDBC Driver for Derby 10.0” from the combo box labeled “Select a driver from the drop-down:”.
- In the URL, replace “C:\DerbyDatabases\MyDB” with a valid
location on your system and click Finish.
Note that if the final directory
(in this case MyDB) does not exist then the database will be created. If it
does exist then it must be a valid Derby database. Avoid the mistake of
specifying the final directory as an empty directory because a connection failure
- Right-click on the connection in the Data Source Explorer
and select the Connect menu item. When the connection is open, expand the
nodes in the tree to view the database objects.