thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

Referential Integrity

The guarantee that every foreign key value matches an existing key in the referenced table, so no orphaned rows exist.

Definition

Referential integrity is enforced by foreign key constraints that block inserts of non-matching values and control what happens when a referenced row is deleted or updated. Without it, child rows can point to parents that no longer exist.

Example

Deleting a customer who still has orders fails unless ON DELETE CASCADE or SET NULL is defined.

Exam tip

Referential integrity relates to foreign keys and entity integrity to primary keys; exams pair them deliberately.

Related terms