Referential Integrity

The rule that foreign-key values must reference an existing allowed key or be NULL when permitted.

What is Referential Integrity in a relational database?

Referential Integrity — The rule that foreign-key values must reference an existing allowed key or be NULL when permitted.

CREATE TABLE purchase_order (
    order_id INTEGER PRIMARY KEY,
    customer_id INTEGER REFERENCES customer (customer_id)
);

Level: Journeyman · More Database terms at this level

Updated