referential integrity


referential integrity

(database)A collection of properties which should bepossessed by data in a relational database.

For example, in a database of family members, if we enter A asa spouse of B, we should also enter B as a spouse of A.Similarly, if we remove one end of the relationship we shouldalso remove the other.

referential integrity

A database management safeguard that ensures every foreign key matches a primary key. For example, customer numbers in a customer file are the primary keys, and customer numbers in the order file are the foreign keys. If a customer record is deleted, the order records must also be deleted; otherwise they are left without a primary reference. If the DBMS does not test for this, it must be programmed into the applications.