Referential Integrity (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
Referential integrity
Referential integrity
Ensures relationships between tables remain consistent
Orphaned records
Orphaned records
Records with invalid references
Foreign key value requirement
Foreign key value requirement
Must be null or match a primary key in related table
How referential integrity is enforced
How referential integrity is enforced
Through foreign key constraints
Foreign key constraint prevents insertion of
Foreign key constraint prevents insertion of
Values that don't match existing primary keys
Deleting a referenced primary key
Deleting a referenced primary key
Blocked unless cascading delete is specified
Cascading delete
Cascading delete
Automatically deletes related records in child tables
Cascading updates
Cascading updates
Automatically updates related records in child tables
How referential integrity prevents orphaned records
How referential integrity prevents orphaned records
Ensures every record has valid reference in primary table
Referential integrity maintains consistency by
Referential integrity maintains consistency by
Enforcing consistent relationships across tables
How referential integrity improves reliability
How referential integrity improves reliability
Prevents invalid references, ensuring accurate results
Cascading operations benefit
Cascading operations benefit
Automatically manage related records, streamlining database
Ignoring foreign key constraints leads to
Ignoring foreign key constraints leads to
Orphaned records with invalid references
