Object types

Crash course in object types

An object type groups objects with similar characteristics. For example, the database designer may have created the object types "Word", "Phrase", "Clause", "Book", etc.

An object type has a number of "attributes", also known as "features". The features that an object type has determines the values that can be associated with objects of the given type.

For example, an object of type "Phrase" may have values for features such as "phrase_type", and "function". This is up to the database designer to decide.

A feature always has a type, drawn from the following table:

  • integer: A positive or negative integer, or 0.
  • string: An 8-bit string
  • ascii: A 7-bit string
  • id_d: A pointer that points to the "self" feature of another object.
  • everything else: An enumeration.

All objects have a "self" feature which is a unique ID. Ohter objects can refer to a given object by the value of that object's "self" feature. Database designers use the "id_d" feature type for this purpose.

The schema tree

Here is a partial schema tree showing the object types of a sample database:

Schema tree with sample object
types

The object types appear directly below the "Object Types" label. For example, in the above picture, "chapter", "book", "verse", and "word", are all object types.

You can collapse or expand each object type by pressing the "+" and "-" buttons next to the object type's name. When expanded, the features will appear, along with their type (see the list above).

If a feature's type is an enumeration, then the feature label can be expanded to show the enumeration labels. In the above example, the object type "chapter" has a feature "book" whose type is the enumeration "book_name_t". The enumeration labels are not visible, but the user could clikc the "+" next to "book" to expand the tree and see the enumeration labels.

The object type "word" has a feature "gender" which is of the enumeration type "gender_t". This has been expanded to reveal the labels "NA", "masculine", "feminine", and "unknown".


Previous:Enumerations
Up:Database Schema area
Next:Monad sets