Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Cascading behavior in relational databases is part of referential integrity enforcement. Two commonly confused actions are “ON UPDATE CASCADE” and “ON DELETE CASCADE.” This question checks whether you can distinguish cascading updates (propagating key changes) from cascading deletes (removing dependent rows when a parent is removed).
Given Data / Assumptions:
Concept / Approach:
“Cascading updates” means that when a parent's key value (typically the primary key) changes, the DBMS automatically updates matching foreign key values in related child rows. “Cascading deletes” means that when a parent row is deleted, the DBMS automatically deletes all related child rows. The statement in the stem describes cascading deletes, not cascading updates, therefore it is incorrect.
Step-by-Step Solution:
Verification / Alternative check:
Create a small schema and enable ON UPDATE CASCADE without ON DELETE CASCADE. Update the parent key and observe child keys change; delete the parent and observe the delete fails (or is restricted) unless ON DELETE CASCADE is also defined.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing ON UPDATE CASCADE with ON DELETE CASCADE; assuming both are always enabled; forgetting that changing primary keys should be rare (use surrogate keys to minimize update cascades).
Final Answer:
Incorrect
Discussion & Comments