This project is read-only.

NDatabase OID


  • OID stands for Object ID.
  • In NDatabase, every entity (class or object) has an OID.
  • An OID uniquely identifies an entity in the NDatabase.
  • NDatabase has special blocks to keep associations between the OID and the physical position of the entity in the database file. The OID allows a direct access (IStorageEngine.GetObjectFromId(OID id)) to the object with a reduced number of IO operations.
  • All pointers in the database use OIDs. When an object has a relation with another, the relation is stored using the OID object. Example:
    • If a user has an attribute profile (with OID 15), the user object will be stored as having a relation with the OID 15.

Implementation


  • The OID is represented by NDatabase.Odb.OID interface. Default implementations are NDatabase.Odb.Core.Oid.ClassOID and NDatabase.Odb.Core.Oid.ObjectOID.
  • OIDs are managed by the NDatabase.Odb.Core.Layers.Layer3.Oid.IdManager class, which implements NDatabase.Odb.Core.Layers.Layer3.IIdManager interface.

public interface OID : IComparable
{
    long ObjectId { get; }
}

Last edited Dec 28, 2012 at 10:39 AM by jacek, version 11

Comments

No comments yet.