Image:Referential integrity broken.PNG
From Wikipedia, the free encyclopedia
No higher resolution available.
Referential_integrity_broken.PNG (548 × 442 pixels, file size: 11 KB, MIME type: image/png)
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
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Subject to disclaimers. |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Dimensions | User | Comment | |
---|---|---|---|---|
current | 07:56, 19 July 2005 | 548×442 (11 KB) | Ta bu shi da yu (Talk | contribs) | (Show that the link is broken.) |
07:49, 19 July 2005 | 548×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) |
- Search for duplicate files
- Edit this file using an external application
See the setup instructions for more information.
File links
The following files are duplicates of this file: