Identifying vs Non-Identifying Relationship

Context: FIT2094_MOC Ā· whether a parent’s key becomes part of the child’s key Ā· solid vs dashed line Ā· identifying relationships create weak entities

Quick Revision

  • šŸŽÆ Objective: does the parent’s key become part of the child’s key? āž” solid = yes, dashed = no.
  • šŸ“¦ Core Components: identifying (solid, weak child) vs non-identifying (dashed, own key).
  • ⚔ Key Constraint: identifying ⟹ parent PK enters the child’s composite PK; non-identifying ⟹ plain FK.

šŸ“ Core

1. The Distinction

  • Identifying āž” A’s key is part of B’s key; B can’t be identified without A; solid line.
  • Non-identifying āž” A’s key is not part of B’s key; B has its own key; dashed line.

2. The Line-Style Rule

  • Solid = identifying āž” child inherits parent’s key into its own (composite) key → weak entity (ROOM needs hotel_id).
  • Dashed = non-identifying āž” both keep own keys (DEPARTMENT/dept_no, EMPLOYEE/emp_no).
  • Identifying ⟺ weak child āž” a weak entity is precisely one identified via an identifying relationship.
  • Test āž” ā€œcan B be identified without A’s key?ā€ No ⟹ identifying.

āš™ļø Core Implementation

šŸ”¹ Identifying vs non-identifying

āš–ļø Core Decision Matrix

AspectIdentifyingNon-identifying
linesoliddashed
parent key in childpart of PKFK only
childweak entityown PK
exampleHOTEL–ROOMDEPARTMENT–EMPLOYEE

When It Flips: identifying relationships and weak entities are two views of the same dependency. Logically: identifying ⟹ parent PK becomes part of the child's composite Primary Key; non-identifying ⟹ parent PK is a plain Foreign Key. Line style is independent of the cardinality symbols.

šŸ“Š Exam Execution Trace

Applied Exercise

Problem: Room 601 can exist in many hotels. Is HOTEL–ROOM identifying? Give the schema. Derivation Proof / Hand-Calculation Walkthrough:

Final Extracted Output: identifying; ROOM’s composite PK includes HOTEL’s hotel_id (weak entity).

🧠 Active Recall