Identifying vs Non-Identifying
In an ER Diagram, a relationship between entities can either be:
- Identifying Relationship → when the child entity’s existence and primary key depend on the parent entity.
- Non-Identifying Relationship → when the child entity exists independently and just refers to the parent entity via a foreign key.
Identifying Relationship
- Occurs when a weak entity depends on a strong entity.
- The child entity does not have a primary key of its own.
- The parent entity’s primary key becomes part of the child’s composite primary key.
- In ERD (Chen notation): double diamond.
- In Crow’s Foot ERD: the child’s PK includes the FK (solid line).
Example: Bank Account & Transaction
Transactionis a weak entity because it cannot exist without an Account.- Each transaction is identified by (Account_ID + Transaction_ID).
ER Representation:
[ACCOUNT] ◉──(Identifies)──◉ [TRANSACTION]
ACCOUNT
-------------------
Account_ID (PK)
Account_Type
Balance
TRANSACTION
-------------------
Account_ID (PK, FK)
Transaction_ID (PK)
Amount
Date
Transactionis identified only when combined withAccount_ID.- This makes the relationship identifying.
Non-Identifying Relationship
- Occurs when the child entity is a strong entity with its own primary key.
- The parent’s primary key is added as a foreign key only (not part of child’s PK).
- In ERD: single diamond.
- In Crow’s Foot ERD: the child’s PK does not include the FK (dashed line or regular line).
Example: Teacher & Course
- A
Courseexists independently of a teacher. - Each course has its own
course_idas a primary key. - But we add
teacher_idas a foreign key to show who teaches it.
ER Representation:
[TEACHER] ──(Teaches)── [COURSE]
TEACHER
-------------------
teacher_id (PK)
Name
Department
COURSE
-------------------
course_id (PK)
course_name
Credits
teacher_id (FK)
Coursehas its own independent key (course_id).teacher_idis just a foreign key reference.- This makes the relationship non-identifying.
Key Differences between Identifying and Non-Identifying Relationships
| Feature | Identifying Relationship | Non-Identifying Relationship |
|---|---|---|
| Entity Type | Connects strong → weak entity | Connects strong → strong entity |
| Child’s Primary Key | Includes parent’s PK | Independent of parent’s PK |
| Existence | Child cannot exist without parent | Child can exist without parent |
| ERD Symbol | Double diamond (Chen) / solid line (Crow’s Foot) | Single diamond (Chen) / dashed/regular line (Crow’s Foot) |
| Example | Account–Transaction | Teacher–Course |
Real-Life Analogy
- Identifying → Like a transaction receipt: it only makes sense when tied to a specific account.
- Non-Identifying → Like a course: it exists on its own, but you can assign a teacher to it.