Anti Corruption Establishment Department PPSC Updateable
What is the Cascade Delete option used for?
Show answer
Correct answer: C) it ensures that all the related records will be deleted automatically when the record from parent table is deleted.
Cascade Delete is a referential-integrity rule in databases. When it is enabled on a relationship, deleting a record from the parent (primary) table automatically deletes all related records in the child (foreign-key) tables, keeping the database consistent.
Related facts:
Example: deleting a customer record automatically deletes that customer’s orders.
The related rule Cascade Update automatically updates matching foreign-key values when a primary key changes.
Exam tip: Database integrity rules are a high-frequency topic in computer MCQs.
Explanation
Cascade Delete is a referential-integrity rule in databases. When it is enabled on a relationship, deleting a record from the parent (primary) table automatically deletes all related records in the child (foreign-key) tables, keeping the database consistent.
Related facts:
Example: deleting a customer record automatically deletes that customer’s orders.
The related rule Cascade Update automatically updates matching foreign-key values when a primary key changes.
Exam tip: Database integrity rules are a high-frequency topic in computer MCQs.
This answer may be out of date (last checked December 2020)