Collection access
Collection access is always based on a collection ID. In the first step, the instance LOID is searched in the collection by key value or position. In case of single instance collections, the collection LOID is the Instance LOID. In general, the following steps are required:
- Select proper index LOID in case of multiple index collections.For single index collections, the collection LOID is already the index LOID.
- Get the Instance LOID from the index by accessing an index entry with a passed key value or at a given position. In case of single instance collection, the index LOID is already the instance LOID
- Provide the object instance for the instance LOID.
In case of multiple indexes, the collection LOID refers to an index reference list, wich consists of a list of index references:
Index reference
|
Pos |
Size |
|
|
0 |
8 |
Index LOID |
|
8 |
2 |
key number |
The key number is an internal key number defined in the database schema, when defining an index (assigning a key definition to a collection). Index properties are part of the schema index definition. The index entry refers to an ordered or unordered list of index entries.
Instance reference
|
Pos |
Size |
|
|
0 |
8 |
Instance LOID or instance LOID list |
|
8 |
n |
key value (for ordered indexes, only) |
The instance LOID is used than for accessing the object instance.
Since there are different requirement on indexes as fast, dynamical in size, minimum of space etc, index entries are provided in a simple index list only for unordered or small unique indexes. For other purposes, index might be organized as binary or B* tree. In case of multiple key values, the index entry LOID does not refer to an instance LOID, but to an instance LOID list, which is simply a list of LOIDs for instances with the same key value.

