Modeling 1:M Relationships
1:M
relationships are modeled by placing the primary key of entity A as a foreign key component of entity B.
Example
Because 1:M
relationships are asymmetric, the entity A key must be placed in entity B. The reciprocal relationship does not model the same E-R relationship.
A |
|
B |
|
A_Key |
|
B_Key |
A_Key |
PK |
|
PK |
FK |
A1 |
|
B1 |
A1 |
A2 |
|
B2 |
A3 |
A3 |
|
B3 |
A1 |
|
|
B4 |
A1 |
|
|
B5 |
A3 |