Published: February, 15th 2008 HiveBoard
The online shared WhiteBoard
SourceForge.net Logo

2. Setup the HiveBoard database on HSQLDB

At this step, we suppose that the HSQLDB server is not yet started. It is assumed that you know how to manipulate HSQLDB and HSQLDB tools concepts.

The first action you have to perform is to add the HiveBoard database (to be created next) to the list of databases run by the HSQLDB engine. This is typically done by modifying HSQLDB server.properties configuration file to contain:

server.dbname.0=hiveboard
server.database.0=file:data/hiveboard

The "0" digit above is the index of the HiveBoard database in the list of all databases run by HSQLDB. If you already use HSQLDB, you will probably have to use a greater index. Pay attention that HSQLDB is limited to 10 databases. For more information on this setup aspect, please refer to HSQLDB documentation.

Now you can start the HSQLDB engine as usual.

You then need to create the new HiveBoard database on HSQLDB server, for this, HSQLDB SqlTool application is used. Prior to using SqlTool, it is assumed that you have an sqltool.rc file including the following lines (for more information, please refer to HSQLDB manual):

urlid hiveboard
url jdbc:hsqldb:hsql://localhost/hiveboard
username sa
password

Now you can use SqlTool to create the HiveBoard database in HSQLDB:

cd hb-server-bin/initdb/hsqldb
java -jar HSQLDB_HOME/lib/hsqldb.jar --autoCommit hiveboard schema.sql
java -jar HSQLDB_HOME/lib/hsqldb.jar --autoCommit hiveboard initdata-prod.sql

In the command line above, "HSQLDB_HOME" should be replaced with the actual path to HSQLDB install directory.

The file schema.sql creates the structure of the hiveboard database (tables, indexes). The file initdata-prod.sql creates one specific account (login='admin', empty password) who has HiveBoard administrator rights and can thus create other accounts (through the HiveBoard client application).

Before proceeding with the next step, let's check that the HiveBoard database has been correctly initialized:

java -jar HSQLDB_HOME/lib/hsqldb.jar hiveboard
sql> select * from ACCOUNT;
sql> \q

SqlTool should display 'admin' in the list of accounts.