Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
In a 1:1 relationship, each row in table A matches at most one row in table B and vice versa. While it may seem that key placement is arbitrary, good modeling ties the foreign key choice to business semantics and optionality (whether either side can exist without the other).
Given Data / Assumptions:
Concept / Approach:
If one side is optional, place the foreign key in the optional table and often make it both FOREIGN KEY and PRIMARY KEY (or UNIQUE) to enforce 1:1. If both sides are mandatory, you still choose the table that logically “depends on” the other or consolidate them into one table if separation brings no benefit. Arbitrary placement risks awkward insertion order, unnecessary NULLs, and harder enforcement of optionality. Therefore, primary key/foreign key decisions are guided by semantics, not caprice.
Step-by-Step Solution:
Verification / Alternative check:
Attempt to model “optional” with the foreign key on the mandatory side; you will end up with NULLs or a schema that allows invalid states.
Why Other Options Are Wrong:
Common Pitfalls:
Duplicating keys on both sides; not enforcing uniqueness; splitting a single conceptual entity into two tables without a real need.
Final Answer:
Incorrect
Discussion & Comments