Configuring Databases

Introduction

Databases are primarily collections of Records and Indexes along with the associated metadata and objects required for processing the data.

Configuration is typically done in a single file, with all of the dependent components included within it and stored in a directory devoted to just that database. The file is normally called, simply, 'config.xml'.

Example

An example database configuration:

01 <config type="database" id="db_ead">
02   <objectType>database.SimpleDatabase</objectType>
03
04   <paths>
05     <path type="defaultPath">dbs/ead</path>
06     <path type="metadataPath">metadata.bdb</path>
07     <path type="indexStoreList">eadIndexStore</path>
08     <object type="recordStore" ref="eadRecordStore"/>
09   </paths>
10   <subConfigs>
11     ...
12   </subConfigs>
13   <objects>
14     ...
15   </objects>
16 </config>
            
Explanation

In line 1 we open a new object, of type 'database' with an identifier of 'db_ead'. You should replace 'db_ead' with the identifier you want for your database.

The second line defines the type of database. There is currently only one type, so this line should be copied in verbatim.

Between lines 4 and 9 we define 3 paths and one reference to an object. To explain each in turn:

Lines 10-12 will contain a series of subConfig elements, each of which is the configuration for a subsidiary object such as the recordStore and the indexes.

Lines 13-15 will contain a series of path elements, each of which has a reference to an object that has been previously configured. This lines instruct the server to actually instantiate the object. This means that the objects can be configured globally but only built when required.