AI engineering glossary · SQL databases

What is referential integrity?

Referential integrity: The guarantee that every foreign key value points to an existing row in the referenced table. The database blocks or cascades changes that would break this, such as deleting a customer who still has orders.

Level: intermediateTopic: SQL databases

Referential integrity: an example

With ON DELETE RESTRICT, deleting customer 7 fails while orders for customer 7 still exist.

Related terms

More SQL databases terms

Where you learn it

Referential integrity is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.