Difficulty: Easy
Correct Answer: referential integrity constraint
Explanation:
Introduction / Context:
Foreign keys connect related tables. A core rule ensures that any foreign key value in a child table corresponds to an existing key value in the parent table. This rule prevents orphan records and maintains consistency across relations.
Given Data / Assumptions:
Concept / Approach:
Referential integrity is the constraint that enforces valid references between related tables. It ensures every foreign key value either matches a candidate key value in the referenced table or is null (if allowed), thereby protecting data consistency.
Step-by-Step Solution:
Verification / Alternative check:
Consider a DELETE of a parent row. Without referential integrity, child rows referencing it would become orphans. With referential integrity, the DBMS blocks the delete, cascades the change, or sets nulls according to the defined action.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming primary keys alone guarantee cross-table consistency. They do not; you must define foreign keys with referential actions.
Final Answer:
referential integrity constraint
Discussion & Comments