GANYMEDE's DBStore file is a simple self-describing object store. The DBStore contains a two-level data dictionary and a simple encoding of all objects defined in the DBStore. The database scheme is encoded into the database file, but can be changed by the schema editor built into the Admin Console.
In the DBStore, object types, field types, object instances and fields in object instances are all identified via numeric identifiers. There can be on the order of 32 thousand different types of objects defined in the database, with each type of object having its own numeric 'namespace'. This allows each type of object to have on the order of 2 billion different instances stored in the database. Likewise, for each object type, there can be on the order of 32 thousand fields defined.
GANYMEDE is being designed with the assumption that once an object is created, it retains sole ownership of its object number forever. This simplifying assumption allows us to use an object number as an 'invariant id', suitable for use as an inter-object reference pointer. All internal processing, event tracking, etc., will use these object identifiers.
All elements in the DBStore file are stored using the Java DataStream object's binary encoding. In particular, strings are not ASCII, but rather are UTF Unicode strings. UTF encoding incorporates the length of the string into the binary encoding, allowing for strings of arbitrary length using the full 64k character Unicode character set in a compact representation.
Here is how the file is laid out:
DBStore Header (including object type count)
Object Type Definition (including Field count)
...
Object Data (including field count for this object)
Field Data, one of the following
Field Data
..
Object Data (including field count for this object)
Field Data
..
..
Object Type Definition (including field count)
..
| Description | Typical Value | Encoding |
|---|---|---|
| Ganymede ID String | GStore | UTF Unicode |
| Major Version | 1 | Byte |
| Minor Version | 0 | Byte |
| DBObjectBase count | 6 | Short |
| Description | Typical Value | Encoding |
|---|---|---|
| Object Type Name | User | UTF Unicode |
| Object Type ID | 3 | Short |
| Field Count | 6 | Short |
| Description | Typical Value | Encoding |
|---|---|---|
| Object Count | 1012 | Int |
| Description | Typical Value | Encoding |
|---|---|---|
| Object Id | 39412 | Int |
| Field Count | 6 | Short |
| Description | Typical Value | Encoding |
|---|---|---|
| Field Code | 2 | Short |
| Description | Typical Value | Encoding |
|---|---|---|
| Element Count | 5 | Short |
| Boolean Value [0] | True | Boolean |
| .. | .. | .. |
| Description | Typical Value | Encoding |
|---|---|---|
| Boolean Value | False | Boolean |
| Description | Typical Value | Encoding |
|---|---|---|
| Element Count | 2 | Short |
| Date Value[0] | Thursday, October 24, 1996 13:29:24 CDT | Date |
| .. | .. | .. |
| Description | Typical Value | Encoding |
|---|---|---|
| Date Value | Thursday, October 24, 1996 13:29:24 CDT | Date |
| Description | Typical Value | Encoding |
|---|---|---|
| Element Count | 5 | Short |
| Object Type[0] | 21 | Short |
| Object ID[0] | 354651 | Int |
| .. | .. | .. |
| Description | Typical Value | Encoding |
|---|---|---|
| Object Type | 21 | Short |
| Object ID | 31245 | Int |
| Description | Typical Value | Encoding |
|---|---|---|
| Element Count | 8 | Short |
| Numeric Value[0] | 54121 | Int |
| .. | .. | .. |
| Description | Typical Value | Encoding |
|---|---|---|
| Numeric Value | 12003 | Int |
| Description | Typical Value | Encoding |
|---|---|---|
| Element Count | 2 | Short |
| String Value[0] | Jonathan Abbey | UTF Unicode |
| .. | .. | .. |
| Description | Typical Value | Encoding |
|---|---|---|
| String Value | Navin Manohar | UTF Unicode |
Last Modified: [an error occurred while processing this directive]