1. A method of enforcing a referential integrity constraint between a constraint set and a constrained object in a relational database management system, the constraint set and the constrained object having values that are terms of an ontology and the method comprising the steps performed in the relational database management system of: receiving an ontology query, wherein the ontology query returns a set of terms of the ontology as the constraint set to be used to define the referential integrity constraint, wherein different constraint sets having different sets of terms can be derived by querying the same ontology; providing the referential integrity constraint for the constrained object, the constrained object comprising a constrained column that is defined in the relational database management system and the act of providing comprises: making a term object with a column wherein values in the column being the members of the returned set of terms; and using the column of the term object to define the referential integrity constraint for the constrained object; when an operation in the relational database management system adds a term to the constrained object, permitting the operation only if the added term belongs to the constraint set; and when a modification is performed on the ontology in the relational database management system that results in a different set of terms being returned by the ontology query, altering one or more values in the constrained object that are not contained in the different set of terms.