Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Cardinality and optionality constraints in data models dictate whether an entity must have related rows. When the child is mandatory for a parent, business rules require at least one child to exist for each parent. This question asks whether that restricts creating a parent without a child.
Given Data / Assumptions:
Concept / Approach:
Pure foreign keys enforce child must reference a parent, not the reverse. To enforce “a parent must have at least one child,” additional mechanisms are needed (deferred constraints, triggers, or check constraints combined with modeling patterns). Conceptually, the requirement means a parent cannot persist without at least one child. Practically, this is often handled in a single transaction: insert parent, insert child, then commit. Hence, the restriction exists by design when properly enforced.
Step-by-Step Solution:
Verification / Alternative check:
Attempt to commit a transaction that inserts a parent but no child with enforcement enabled; expect failure or rollback. Insert both parent and child; expect success.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming foreign keys alone enforce parent-must-have-child; forgetting to make constraints deferred to allow parent-before-child within a single transaction; relying solely on application logic without database enforcement.
Final Answer:
Correct
Discussion & Comments