Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:Inheritance in ER/EE-R modeling relies on a shared identity between the supertype and its subtypes. Understanding this identity is crucial for correct key design and for implementing specialization in relational schemas.
Given Data / Assumptions:
Concept / Approach:An instance of a subtype is not a separate entity from the supertype—it is the same real-world thing viewed with additional properties. For example, an Employee is a Person with employment-specific attributes. The subtype shares the supertype’s identifier, ensuring that joins between supertype and subtype rows reconstruct the full set of attributes for the same entity.
Step-by-Step Solution:
Create the supertype with an identifier (for example, person_id).Create subtype tables keyed by the same identifier (person_id as both PK and FK).Enforce one-to-one (or optional) cardinality to maintain shared identity.Use the shared key to retrieve combined attributes without ambiguity.Verification / Alternative check:Inspect a subtype row’s key; it is identical to the supertype row’s key. There is no separate surrogate identity for the subtype instance unless designed otherwise, and even then it should still reference the supertype key as a foreign key with uniqueness to preserve identity.
Why Other Options Are Wrong:
Common Pitfalls:Generating new surrogate keys for subtype tables without enforcing a one-to-one relationship back to the supertype, which can cause duplication and integrity issues.
Final Answer:Correct
Discussion & Comments