18. A system for reference partitioning database objects by values in a reference field, the system comprising: at least one hardware processor; at least one database environment, the database environment supporting triggers and partitioning and being partitioned based on values of a reference field; at least one application program; and memory storing: a reference field metadata framework that that defines classes of database objects in a hierarchy, parent-child relationships between classes, wherein each database object is a row in a table of the database environment, and instructions that, when executed by the at least one hardware processor, cause the system to perform operations including: receiving, from the application program, a new value for a foreign key of a child database object, the child database object being a child of a parent object in the hierarchy, applying an inheritance function associated with a class of the child object to determine a value of the reference field for the child database object, changing, responsive to the determined value differing from a current value of the reference field for the child database object, the current value to the determined value and moving a table row for the child database object to a partition associated with the determined value, and repeating the applying and changing for any children of the child database object in the hierarchy.
18. A system for reference partitioning database objects by values in a reference field, the system comprising: at least one hardware processor; at least one database environment, the database environment supporting triggers and partitioning and being partitioned based on values of a reference field; at least one application program; and memory storing: a reference field metadata framework that that defines classes of database objects in a hierarchy, parent-child relationships between classes, wherein each database object is a row in a table of the database environment, and instructions that, when executed by the at least one hardware processor, cause the system to perform operations including: receiving, from the application program, a new value for a foreign key of a child database object, the child database object being a child of a parent object in the hierarchy, applying an inheritance function associated with a class of the child object to determine a value of the reference field for the child database object, changing, responsive to the determined value differing from a current value of the reference field for the child database object, the current value to the determined value and moving a table row for the child database object to a partition associated with the determined value, and repeating the applying and changing for any children of the child database object in the hierarchy. 20. The system of claim 18 , wherein the reference field metadata framework also stores, for each parent-child relationship, a join query and wherein applying the inheritance function includes using the join query for the class of the child database object.