8. A system comprising: at least one hardware processor; at least one database environment, the database environment supporting triggers and foreign keys; at least one application program; and memory storing: a referential integrity metadata framework that: identifies classes in a hierarchy of objects, identifies, for each class, at least one identifying attribute of the class, identifies, for at least some classes, at least one relationship attribute for the class, and identifies, for each relationship attribute, a relationship with a corresponding identifying attribute in another class, and an initialization module configured to use the referential integrity metadata framework to: generate tables in the database environment based on the referential integrity metadata framework, each table corresponding to a class in the referential integrity metadata framework, generate primary keys for the tables based on the identifying attributes, generate referential integrity structures based on the relationship attributes, and generate at least one class-specific procedure for each class, the procedure for a class extracting a value for each identifying attribute and relationship attribute identified in the referential integrity metadata framework for the class, generate a data manipulation language statement using the extracted values, and issue the data manipulation language statement, wherein the at least one application program uses the database environment to persist entire object data documents in their entirety and enforce referential integrity in relationships between object data documents.
15. The system of claim 8 , wherein the memory further stores instructions that, when executed by the at least one processor, cause the system to perform operations comprising: receiving a request from an application program to insert a new object data document; determining a class for the new object data document; and calling the class-specific procedure for the class of the new object data document, the class-specific procedure generating the data manipulation language statement that inserts the new object data document and extracted values as a row in a table in the database environment, the table corresponding to the class in the referential integrity metadata framework.