Difficulty: Easy
Correct Answer: The supertype primary key is assigned to each subtype.
Explanation:
Introduction:
Supertypes and subtypes model specialization. In the relational mapping, maintaining identity across the hierarchy is critical. The conventional approach is to propagate the supertype’s identifier into each subtype, preserving a one-to-one correspondence of rows that share the same identity.
Given Data / Assumptions:
Concept / Approach:
The standard strategy assigns the supertype’s primary key to every subtype as both the primary key and a foreign key referencing the supertype relation. This guarantees that each subtype row corresponds to exactly one supertype row. Alternatives, such as independent surrogate keys in subtypes, complicate identity management and break the clean one-to-one mapping.
Step-by-Step Solution:
Create a relation for the supertype with its primary key.Create a relation for each subtype.Include the supertype key in each subtype relation as its primary key.Declare that key also as a foreign key referencing the supertype relation.
Verification / Alternative check:
Check entity counts and identity flows: a subtype instance cannot exist without the corresponding supertype instance when total participation applies, and the shared key enforces that relationship neatly.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to declare the subtype key as both primary and foreign key, which weakens integrity across the hierarchy.
Final Answer:
The supertype primary key is assigned to each subtype.
Discussion & Comments