Monday, April 18, 2016

Query Derby DB

Derby is an embedded database.  You can use derby within a Java program.

It does not support multiple user sessions.  Otherwise, it is very good to organize the configuration data in a database, instead of using a file.


To query Derby database, we need to use a client software.

I use the ij client that can connect to Derby.

ij is available from this directory:


PATH=${PATH}:/usr/java/jdk1.8.0_77/db/bin
export PATH
which ij

You should be able to see ij.

Run ij:

ij
connect 'jdbc:derby:/<path to the derbydb folder>;user=<username>';
SHOW TABLES;
SHOW CONNECTIONS;
help;
describe <user>.<table name>;
select * from SYS.SYSTABLES;


Post a Comment