Skip to main contentSkip to solution

In SQL databases, what does the term "referential integrity" mean?

Solution

✅ Correct Option: 2

Referential integrity means the relationships between tables stay consistent. It is enforced through a foreign key: every foreign key value in the child table must match an existing primary key value in the parent table, or be NULL. This prevents orphan records, such as an order that refers to a customer who does not exist.


Option 1: this is entity integrity (uniqueness and non-null primary keys), not referential integrity.

Option 3: too general; it describes data integrity as a whole, of which referential integrity is only one type.

Option 4: this is about performance, which is handled by indexing and query optimisation.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question