Referential integrity is one of the most important features of the relational databases because entities like Employee are referred by their artificial keys, like Employee.ID field in the Employee table.
The object and document-oriented databases like the Eloquera DB (which is both, actually) use the object references instead of referencing by the external keys. For example, Payment object may contain a property of the Employee type for referencing to the right person:
This automatically resolves the problem referring the correct object of the correct type. And in the future the Person property can be set either to null or to any other correct object of the Employee class.
Preventing null values in the property can be done in the object itself (if it is a part of the business logic), in the data access layer on the client side, or in the data access layer on the server side using the stored procedures - a new feature appearing in the upcoming version 4.0 of the Eloquera DB.
The object database does not enforce constrains on the object by itself because that contradicts to the idea of encapsulation, i.e., hiding the internal implementation of the objects. The object may contain some fields or properties not compliant with the constrain requirements as a part of its internal implementation - and perfectly consistent from the application point of view. If the database was to enforce the referential or any other constrains, then such an objects would fail to have been added to the database for no obvious reasons.
Copyright © 2008-2012 Eloquera Corp. All rights reserved.