Background
Apache Derby is an embed database implemented in pure Java. It’s implemented in pure Java, thus it’s more compatible with Java.
There are mainly three database browsers for Derby
- RazorSQL (Commercial)
- Aqua Data Studio (Commercial)
- SQuirreL (Open Source and Free)
Since the first two softwares are commercial, in this tutorial we will introduce how to use SQuirreL.
Prerequisites
-
JRE (or JDK)
Download JRE (or JDK) from java.com and install it. Don’t forget to add its bin path to environment variable.
-
SQuirreL
Download SQuirreL from installation page and install it using following command
java -jar squirrel-sql-<version>-install.jar
(or you can double click the jar file if you’re under Windows)
-
Derby Client and Derby Embedded Driver jar files
Download the zip file from this link, then extract derby.jar and derbyclient.jar from the zip file. Next copy these two files into SQuirreL’s lib folder.
If the two jar files are copied to correct path, you will see in SQuirreL’s Drivers panel Apache Derby Client and Apache Derby Embedded are enabled.
Create a connection to Derby database
In Alias Panel, click Add Alias button
The Name field is not important, and you can fill in with anything. In URL field you enter the server address and database name, e.g. jdbc:derby://localhost/derby_test
And if you want to connect to embedded file database, you need set JDBC Connection URL like following:
jdbc:derby:PATH
Assume the database is located at D:\derby_test, then the JDBC URL should be
jdbc:derby:D:\derby_test
The post Apache Derby Database Browser appeared first on Redino blog.