Referential integrity
The degree to which data values of the primary key of one data file and data values of the foreign key of another data file are equal.
- •Ensures valid and consistent relationships between data in different tables, files, or datasets.
- •Prevents orphan records (e.g., orders without customers) and maintains logical data linkages.
- •Improved data accuracy and reliability for joined datasets and relational queries.
- •More stable, predictable, and robust database operations and application behavior.
- •Orphan records leading to incomplete information, erroneous reports, or process failures.
- •Data inconsistencies and inaccuracies when related records are missing, mismatched, or incorrectly linked.
- •Errors in applications, analytics, and reports that rely on the integrity of data relationships.
- •Potential for database instability, data corruption, or application crashes in severe cases.
%
Logistics: All foreign keys in the shipment table (e.g., VesselID, PortOfLoadingID, CustomerID) correctly reference existing primary keys in their respective master tables (Vessel, Port, Customer).
University: Database constraints ensure that a student cannot be enrolled in a course unless the 'CourseID' exists in the 'Courses' table and the 'StudentID' exists in the 'Students' table.
Manufacturing: The ERP system enforces referential integrity, preventing the creation of work orders if any component part numbers in the BOM do not exist in the material master.
Logistics: An order record in the sales system references a Customer ID that no longer exists (or never existed) in the customer master table, creating an 'orphan' record.
University: An enrollment record links to a 'CourseID' that has been deleted from the official course catalog.
Manufacturing: A production order references a 'PartNumber' in its bill of materials that is not defined in the item master data.