company logo

LOID

The local unique identifier (LOID) or identity is a database internal number, which identifies any independent object instance or collection property (database entry).

An LOID is a 64-Bit number, which contains the entry number in 48 low order bits (unique within a main base or memory). 15 high order bits are reserved for database and main base numbers ant for identifying the type of entry. The top high order byte is a flag and reserved for internal use.

0xFFFF0000 in the 32 high order bytes indicates an empty entry number regardless on the remaining part of the number.

0x8000nnnnnnnn are numbers reserved for transient exd s, i.e exd s for transient indexes or instances.

0x00mmnnnnnnnn are numbers reserved for persistent or temporary exd s stored in mainbase mm. ODABA supports up to 254 main mases for a database.

0x4000nnnnnnnn are numbers reserved for transient database entries, i.e database entries ( indexes or instances) stored in memory.

LOIDs can be used for direct instance access, but LOIDs will change, when copying or reorganizing the database. Hence, LOIDs can be used within a process, but should not be passed between processes. GUIDs should be used instead, which are stable global identifiers.

Generalisations:  instance identifierdata reference

Related topics