Home > .NET Object Database > Database Schema

Database Schema

Get a look behind the scene! This page describes the database schema. Signumsoft .NET Object Database stores data in a generic way. Table structure never needs to be changed. Object relational mapping (ORM, O/R, OR-Mapper) is NOT necessary! Data is stored in the following tables:

Database Schema

Table DefinitionName

The table "DefinitionName" serves as simple dictionary. Every existing class name and every existing field name of the objects found by .NET Reflection in the program code is stored here. To every name is a unique identifier assigned.

Field Name Type Nullable Reference Description
Id Guid No No Unique identifier serves as dictionary key.
Name String No No Dictionary Value. Can be a class name or a field name.

Index Name Columns Unique Description
IX_DefinitionName Name Yes Makes sure that same name does not appear twice in database dictionary.

Table StorageObject

Table "StorageObject" stores all object instances. Every time an object is created a record is added to this table.

Field Name Type Nullable Reference Description
Id Guid No No Unique identifier for object. Every object needs to be uniquely identified.
ClassNameId Guid No Yes Reference to class name in table "DefinitionName".

Table StorageField

Table "StorageField" stores all object values. Every time an object  value is set, a record is added to this table.

Field Name Type Nullable Reference Description
Id Guid No No Unique identifier for field. Every field is uniquely identified.
ObjectId Guid No Yes Reference to object to which this field belongs.
FieldNameId Guid No Yes Reference to field name in table "DefinitionName".
Key_ SqlVariant No No For lists the index. For Dictionaries the key. For one to one references: Always 0.
Value SqlVariant Yes No (Yes) Field Value. Can be reference to an object.

Index Name Columns Unique Description
IX_DefinitionStorageField ObjectId, FieldNameId, Key_ Yes Make sure that same key on same field on same object does not exist twice.

CacheClassTree

Table "CacheClassTree" contains the hierarchical inheritance structure of the classes. It's called cache since the master of this information is the program code. Inheritance information is just mirrored on the database. This information is used in the generated SQL views.

Field Name Type Nullable Reference Description
Id Guid No No Primary Key
ClassNameId Guid No Yes Reference to class name in table "DefinitionName".
ClassNameIdEquals Guid No Yes Reference to a (base) 'class name' in table "DefinitionName".