11. A non-transitory computer readable storage medium with program instructions for 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, the medium comprising the instructions for: receiving an ontology query and returning 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; and providing the referential integrity constraint for the constrained object, whereby when an operation in the relational database management system adds a value to the constrained object, permitting the operation only if the added value is a member of the set of terms, 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, 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; 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.
11. A non-transitory computer readable storage medium with program instructions for 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, the medium comprising the instructions for: receiving an ontology query and returning 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; and providing the referential integrity constraint for the constrained object, whereby when an operation in the relational database management system adds a value to the constrained object, permitting the operation only if the added value is a member of the set of terms, 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, 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; 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. 16. The medium set forth in claim 11 wherein: a transformation function is associated with the set of terms; and in the altering of one or more values, when a term in the constrained object is no longer contained in the different set of terms using the transformation function to replace the term in the constrained object with one of the terms in the different set of terms.