Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Designers often choose surrogate keys because they rarely change. This question asks whether that fact allows you to ignore referential “update” actions for foreign keys when the parent is required.
Given Data / Assumptions:
Concept / Approach:
While surrogate keys “seldom change,” they can, in principle, change (e.g., data fixes, key reseeding, migrations). Referential action settings (ON UPDATE NO ACTION/RESTRICT/CASCADE) still need to be defined intentionally. Relying on “it will never change” is risky. Therefore, you cannot simply ignore update actions; you must choose a policy (commonly NO ACTION) to protect integrity.
Step-by-Step Solution:
Verification / Alternative check:
Attempt to change a parent key with NO ACTION versus CASCADE; observe the referential effect on child rows. Without an explicit choice, defaults may block updates or cause errors.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming surrogate immutability; overlooking migration scenarios; leaving default referential actions undocumented.
Final Answer:
Incorrect
Discussion & Comments