Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Database modifications may violate the referential integrity constraint.

The following anomalies can occur in a relational database owing to referential integrity constraint:

Repetition anomaly If a foreign key exists between two relations certain information may be repeated unnecessarily. This is known as repetition anomaly. Repetition anomaly results in wastage of storage space. Insertion anomaly This anomaly may occur during the insertion of new records into the referencing relation. Therefore, to preserve referential integrity constraint, it must be ensured that the foreign key values of new records in the referencing relation are matched with the candidate key values in the referenced relation. Update anomaly This anomaly may occur during updating of existing records in both referencing and referenced relations. Hence, before updating, it must be ensured that there is no violation of referential integrity constraint. Deletion anomaly During deletion of existing records from referenced relation, this anomaly may occur. To maintain referential integrity, either all records from the referencing relation whose foreign key values match with candidate key values of deleted records should be deleted or foreign key values should be updated

Integrity Constraints
An important functionality of a DBMS is to enable the specification of integrity constraints and to enforce them. Knowledge of integrity constraints is also useful for query optimization. Examples of constraints:

keys, superkeys foreign keys domain constraints, tuple constraints. Functional dependencies, multivalued dependencies.

You might also like