Subtype identity: Does a single entity instance of a subtype represent the same real-world instance as its corresponding supertype entity (i.e., share identity)?

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:

  • The supertype and subtypes share the same primary key domain.
  • Subtype rows are in a one-to-one relationship with their corresponding supertype row(s).
  • We may implement with one table and a discriminator or with multiple tables joined by the same key.


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:

  • “Incorrect” would imply a different entity is represented, which breaks the inheritance concept.
  • Limiting correctness to disjoint or to a particular physical pattern is unnecessary; identity sharing holds across specialization styles and implementation strategies.


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

No comments yet. Be the first to comment!
Join Discussion