Guideline for Placing the Foreign Key
Place the foreign key in whichever entity minimizes or eliminates the possibility of nulls.
Example
Because of the symmetry of 1:1
relationships, the following entity pairs both model the same relationship:
A |
|
B |
|
|
A |
|
|
B |
A_Key |
|
B_Key |
A_Key |
|
A_Key |
B_Key |
|
B_Key |
PK |
|
PK |
FK, ND |
|
PK |
FK, ND |
|
PK |
A1 |
|
B1 |
A1 |
|
A1 |
B1 |
|
B1 |
A2 |
|
B2 |
A3 |
|
A2 |
B5 |
|
B2 |
A3 |
|
B3 |
A5 |
|
A3 |
B2 |
|
B3 |