This project is read-only.

NDatabase Layers


NDatabase engine contains 3 layers of abstraction to manage the data:
  • Layer 1: Instance Layer
  • Layer 2: Meta representation of objects and classes
  • Layer 3: The physical storage

Layers Big Picture


ODBLayers.png

Layer 1: The instance layer


  • This layer works with Instances.
  • This is the entry point of NDatabase.
  • It is the user interface to NDatabase.

Implementation (Layer 1 -> Layer 2):
  • ObjectIntrospector - uses reflection to transform an object into a NonNativeObjectInfo meta representation.
  • ClassIntrospector - uses reflection to transform a class into a ClassInfo meta representation.

Implementation (Layer 2 -> Layer 1):
  • InstanceBuilder - transforms a NonNativeObjectInfo into an object. It is used when retrieving objects.

Layer 2: The meta representation


  • This layer is a Meta Representation layer.
  • It holds all the data and definition in a language independent way.
  • Main classes are ClassInfo (Meta representation of a class), NonNativeObjectInfo (Meta representation of an instance), NativeObjectInfo (Meta representation of a native value, like int, long, String) and other minor classes.

Layer 3: The file storage


NDatabase stores all data in a unique binary file. This file will contain:
  • The database meta-model : All the classes already stored in the base.
  • The instances.
  • The indexes.
  • And other things, for the details please refer to documentation page about NDatabase file format.

Implementation (Layer 2 to Layer 3):
  • ObjectWriter - writes a NonNativeObjectInfo to the database file.

Implementation (Layer 3 to Layer 2):
  • ObjectReader - reads the database file and creates a NonNativeObjectInfo.

Last edited Oct 15, 2012 at 8:17 PM by jacek, version 19

Comments

No comments yet.