|
In this step the binary relationships of the following type (1,1)(1,1), (0,1)(1,1) or (0,1)(0,1) are transformed into the relational database scheme.
Search for all binary relationships B (1,1)(1,1), (0,1)(1,1) or
(0,1)(0,1). Find the relational scheme S and T that are connected through
relationship B. Choose one of them (eg. S) and insert the primary of the other
relational scheme (eg. T) as a foreign key. Also add the properties of B as
attributes into this relational scheme.
In this example you can see the application
of rule 3:
A binary relationship (type (1,1)(1,1)-, (0,1)(1,1)- and
(0,1)(0,1)) is chosen: leads.
Then we choose an entity set that is related to this
relationship:
Newspaper(Name,
Circulation, Price)
The primary key of the second entity set (eg. ChiefEditor)
is inserted as foreign key in the first relational scheme:
Newspaper(Name,
Circulation, Price,
ChiefEditor_PersNo.)
Now the properties of the relationship are used as
attributes in the relational scheme:
Newspaper(Name, Circulation, Price,
ChiefEditor_PersNo., SinceDate)