Appendix A. How to setup an IMDI metadata Database server

The IMDI metadata DB server is based on the HSQLDB[3] software. The code for running the daemon is contained in "hsqldb.jar" and it is started from a script file "startIMDIdb.sh" . In this startup script information is specified where to find the java installation and the DB files. The DB server uses a number of DB files that hold the RDB tables with metadata. One of these files also contains configuration data that can be edited. The configuration information consists a.o. of the different corpus root url's that should be changed when the corpus changes (physical) location.

The DB files themselves are created from the IMDI browser just as the special DB files for local use are created (see the manual). With this difference that first some configuration information has to be specified. This is done by selecting:"Options" - "Preferences" - "DB creation". The resulting panel offers the following options:o

  1. SeparateKeyValueTables: set this to false if the DB files concern a single corpus that systematically uses the same set of user defined keys. Default is true.

  2. Include Descriptions: if true the information in the "free text" description elements is included in the DB. Default is false.

  3. Corpus Root: The part of the URL path seen by the IMDI brower that all IMDI files of the corpora have in common. This information is used to make the path names in the DB files relative.

  4. Remote Corpus Root: The URL path seen by a www-browser that all IMDI files of the corpus have inc ommon.

  5. UNIX Local Corpus Root: The URL path seen by a (UNIX) NFS client that all IMDI files of the corpus have in common.

  6. Windows Local Corpus Root: The URL path seen by a (Win) SMB client that all IMDI files of the corpus have in common.

This information concerning rool paths is needed if the DB files are to be used by both remote as well as local clients.

Once the DB files have been created, the DB daemon can be started with the startup script., With the currently use version (1.7.1) of the HSQL DB, the daemon can only handle one DB.

Finally the corpus topnode should be made to point to the DB daemon by modifying the topnode "SearchService" and "CorpusStructureService" attributes. These should both have the value: jdbc:hsqldb:hsql://hostname/ where hostname is the name of the host running the HSQL DB server. (N.B. This reference format will change with the next version of the HSQLDB software)

The command file for starting the IMDI DB server on Linux

#!/bin/sh
#This is the startup script for the HSQLDB IMDI DB server
#modify DBDIR to the directory where the DB files can be found
#modify JAVA_HOME to specify the java installation dir
#The hsqldb jar should be in the DBDIR directory
#
#
DBDIR=/data/corpora/IMDI/DB
JAVA_HOME=/usr/lib/java/jre
cd $DBDIR
$JAVA_HOME/bin/java -mx200M -classpath hsqldb__V1.7.1.jar org.hsqldb.Server \
 -database imdi 1>&2 > HSQLDB.log