GANYMEDE DBStore File Format *NOT CURRENT*


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 File Header

Description Typical Value Encoding
Ganymede ID String GStore UTF Unicode
Major Version 1 Byte
Minor Version 0 Byte
DBObjectBase count 6 Short


DBObjectBase Header

Description Typical Value Encoding
Object Type Name User UTF Unicode
Object Type ID 3 Short
Field Count 6 Short


DBObjectBaseField Definition

Description Typical Value Encoding
Field Name Username UTF Unicode
Field Code 2 Short
Field Type 5 Short
NameSpace user UTF Unicode
Invid Target Type / String Length Limit 8 Short


DBObject Data Header

Description Typical Value Encoding
Object Count 1012 Int


DBObject Data

Description Typical Value Encoding
Object Id 39412 Int
Field Count 6 Short


DBField Data

Description Typical Value Encoding
Field Code 2 Short


BooleanArrayDBField

Description Typical Value Encoding
Element Count 5 Short
Boolean Value [0] True Boolean
.. .. ..


BooleanDBField

Description Typical Value Encoding
Boolean Value False Boolean



DateArrayDBField

Description Typical Value Encoding
Element Count 2 Short
Date Value[0] Thursday, October 24, 1996 13:29:24 CDT Date
.. .. ..


DateDBField

Description Typical Value Encoding
Date Value Thursday, October 24, 1996 13:29:24 CDT Date


InvidArrayDBField

Description Typical Value Encoding
Element Count 5 Short
Object Type[0] 21 Short
Object ID[0] 354651 Int
.. .. ..


InvidField

Description Typical Value Encoding
Object Type 21 Short
Object ID 31245 Int


NumericArrayDBField

Description Typical Value Encoding
Element Count 8 Short
Numeric Value[0] 54121 Int
.. .. ..


NumericDBField

Description Typical Value Encoding
Numeric Value 12003 Int


StringArrayDBField

Description Typical Value Encoding
Element Count 2 Short
String Value[0] Jonathan Abbey UTF Unicode
.. .. ..


StringDBField

Description Typical Value Encoding
String Value Navin Manohar UTF Unicode


Last Modified: [an error occurred while processing this directive]