company logo

Defining complex data types

For defining a new complex data type, a structure (SDB_Structure) might be crated by clicking on the Structure region in the class tree or below a complex data type and selecting Insert from the context menu:

Then, the tree insert dialog pops up with the selected region in the tree as current region.

Just enter the new data type name and press enter in order to create the new complex data type. In order to update a complex data type definition, just select the data type name in the class tree. After that, the data type definition form will be displayed in the ClassEditor's work area. In order to update complex data type properties, choose the properties tab on top of the edit form.

Except the Primary key, the definition is complete. The primary key should be set after defining keys for the data type. The primary key is nit required, but the system behaves more transparent, since the primary key is automatically selected as main access key for collections with different access keys. Moreover, special functions are provided in the ODABA API for accessing the primary key, which also require a key selected as primary key for the data type.

Alignment should be set, when the system is running on hardware environments, that trow alignment exceptions (e.g. SUN server).

Persistent data types get an internal type number (Type ID), which is generated by the system and should never be changed. Moreover, one should make sure, that the Access type is set to AT_ODABA.

In order to create global unique identifiers for structure instances, Global ID might be switched on. The option has en effect, only when the data type inherits from __OBJECT.

For creating or updating data type members, the Members tab on top of the edit form should be selected.

ODABA orders complex data type members by category. By selecting the desired category tab in the edit form, one may create, delete or update Base types, Attributes, References, Relationships or Keys.

In order to get better support when defining new members, definitions should be created in the following order:

  1. Base type definitions
  2. Attribute definitions
  3. Key definitions
  4. Extent definitions
  5. Reference definitions
  6. Relationship definitions