Apache Derby provides different types of tools to perform various operations.

These tools are mentioned below.

  1. sysinfo Tool
  2. ij Tool
  3. dblook Tool

Let us see each Apache Derby Tool in detail.


1. sysinfo Tool

The Derby sysinfo tool is used to display information about your Java environment and your version of Derby on the console.

Usage

cloudduggu@ubuntu:~/derby$ ./bin/setEmbeddedCP

cloudduggu@ubuntu:~/derby$ ./bin/sysinfo

Output
sysinfo tool


2. ij Tool

The Derby ij tool is a JDBC tool that can be used to run scripts or interactive queries against a Derby database.

In this example, we have started the “ij” tool and connected it with the database “exampleDB” which we created in the installation section. After that, we have used “show tables” to print all tables present under the “exampleDB” database.

Usage

cloudduggu@ubuntu:~/derby$ ./bin/setEmbeddedCP

cloudduggu@ubuntu:~/derby$ ./bin/ij

ij> connect 'jdbc:derby:exampleDB';

ij> show tables;

Output
ij tool


3. dblook Tool

The Derby dblook utility is used to dumps all or parts of the DDL of a user-specified database to either a console or a file. The generated DDL can then be used for such things as recreating all or parts of a database, viewing a subset of the objects in a database (for example, those objects that pertain to specific tables and schemas), or documenting the schema of a database.

In this example, we will see that the “dblook” tool has given the DDL of table "APP"."HOTELAVAILABILITY" that is present under database “exampleDB”.

Usage

cloudduggu@ubuntu:~/derby$ ./bin/setEmbeddedCP

cloudduggu@ubuntu:~/derby$ ./bin/dblook -d jdbc:derby:exampleDB

Output
dblook tool