Conversion to Relational Model
One-one-one relationship
a)
Converting the
above ER diagram to a relational model:
A: B: C:
D:
a b c a | b |
c
For the relationship
D to be modeled as a relation, primary keys a, b, c from
entities A, B and C respectively go to D as foreign keys which in turn are
reset altogether as a primary key for the relation.
b) Alternative relational model for
one-one-one relationship
Converting the
above ER diagram to a relational model:
A: B: C:
D:
a b c did | a | b | c
Alternatively,
if the relationship D has already a primary key did, it can be modeled as a
relation by taking primary keys a, b, c from entities A, B
and C respectively as foreign keys.
Note: As with many-many binary
relationship, with ternary relationships, the primary key of the relation
modeled from the relationship needs to be determined after careful inspection.
No comments:
Post a Comment