Database Configuration

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     <object type="recordStore" ref="eadRecordStore"/>
08   </paths>
09   <subConfigs>
10     ...
11   </subConfigs>
12   <objects>
13     ...
14   </objects>
15 </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 8 we define 2 paths and one reference to an object. To explain each in turn:

Lines 9-11 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 12-14 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.