Image:Referential integrity broken.PNG

From Wikipedia, the free encyclopedia

An example of a database that has not enforced referential integrity. In this example, there is a foreign key (artist_id) value in the album table that references a non-existent artist — in other words there is a foreign key value with no corresponding primary key value in the referenced table.

This anomaly came about when the record for an artist called "Aerosmith", with an artist_id of "4", was deleted from the artist table, even though the album "Eat the rich" referred to this artist. If referential integrity had been enforced, the deletion of the main record would have been possible, but its associated record would have been deleted as well. Alternatively, the existence of an associated record would not allow the delete operation of the referenced record, and instead return an error code.

[edit] License

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current07:56, 19 July 2005548×442 (11 KB)Ta bu shi da yu (Talk | contribs) (Show that the link is broken.)
07:49, 19 July 2005548×442 (11 KB)Ta bu shi da yu (Talk | contribs) (An example of a database that has not enforced referential integrity. In this example, their is a foreign key ('''artist_id''') value in the album table that references a non-existent artist &mdashl in other words there is a foreign key value with)

The following files are duplicates of this file:

The following pages on the English Wikipedia link to this file (pages on other projects are not listed):