Referential+Integrity


 * Definition:**

Referential Integrity means that all foreign keys in a table must point to a primary key in a related table.


 * Example 1**



In the example above, we can say that //**the relationship between album and artist maintains referential integrity**//

because

each of the foreign keys in the album table points to a primary key in the artist table.


 * Example 2**



However, in this second example we can say that //**the relationship between album and artist DOES NOT maintain referential integrity**//

because

each of the foreign keys for album X0004 in the album table does not point to a primary key in the artist table.