Why entity and referential integrity important in a database

Asked Oct 18, 2012
Referential and entity integrity are crucial to preserving valid relationships between tables and data within a database. SQL queries will begin to fail if the data keys that connect the dots between their relationships do not match. If an entity or table is relying on the keys in another entity or table, then relationships between the two can be lost if bad data is entered into one location. For instance, referential integrity can be used to ensure foreign key values are valid. For instance, a database table listing all the parts installed on a specific aircraft should have referential integrity connecting the part numbers to a table listing valid part numbers for that aircraft so that in the event of a bad part number being “fat-fingered” into the database, the RBDMS will return an error concerning the bad data (IBM 2001).
Answered Jun 08, 2013

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.