Instant DB

Instant DB

InstantDB is a 100% Java, Relational Database Management System (RDBMS).  It is free for non-commercial use and can be downloaded from:-

www.instantdb.co.uk

Using Instant DB

An example application shows how to use both COBRA and idb in a two-tier application.  This application implements a menu driven customer ordering system.  The schema is shown below:-

erd.gif (4600 bytes)

The COBRA data dictionary will also need to be created, this describes the relationship between the schema above and corresponding Java objects.   The file customer.sql is a set of SQL statements to build both schema and dictionary.  To do this the IDB SQL scripting utility is used.

Priming the database

The command sample.java in the idb/examples directory is used to create and prime the database.  This command will have to be compiled using the java compiler:

    javac Sample.java

The CLASSPATH will have to be set to include the idb classes and the standard classes on java versions prior to 1.2.

By default, sample looks for a file called sql1.txt in the current directory, this contains commands to build the data dictionary, it then loads and runs customer.sql.  This script populates the data dictionary and builds the schema above.

Running the Sample Application

Run the command

   java uk.co.kimble.examples.Example1 connection.properties