Association (intersection) tables in many-to-many relationships: are such tables identifying (ID-dependent) on both of their parent tables?

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
Many-to-many relationships are implemented using an intersection (associative) table that links two parent tables. This item tests whether you recognize that the intersection table's identity is tied to both parents.



Given Data / Assumptions:

  • Two parent entities (e.g., Students and Courses).
  • An intersection table (e.g., Enrollments) with foreign keys to both parents.
  • Primary key often composed of both foreign keys (or a surrogate plus unique constraint on the pair).


Concept / Approach:
In an identifying relationship, a child's identity is defined by its parent(s). For an intersection table, the row cannot exist without valid references to both parents; its logical identity is the combination of those references. Thus, it is ID-dependent on both parents. Even if a surrogate key is used, a unique constraint on the two FKs maintains the identifying semantics.



Step-by-Step Solution:

Create an intersection table with two FKs to the parents.Define the PK as the pair of FKs, or use a surrogate with a unique pair constraint.Observe that deleting a parent typically restricts or cascades to the intersection row.Conclude ID-dependency on both parents.


Verification / Alternative check:
Attempt to insert an intersection row without a valid parent key — the insert fails due to FK constraints.



Why Other Options Are Wrong:

  • “Incorrect” contradicts standard M:N modeling.
  • “Only with surrogate PKs” is false—the dependency is logical, not PK-type specific.
  • “Depends on optionality” affects nullability and participation, not identity.


Common Pitfalls:
Forgetting the unique constraint on the pair when using a surrogate; failing to cascade or restrict deletes in a controlled way; allowing duplicates of the same association.



Final Answer:
Correct

Discussion & Comments

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