|
In this step all binary relationships one to many/many to one (1,n)(1,1), (0,n) (1,1), (1,n)(0,1) or (0,n)(0,1) are transformed into the relational database scheme.
Search for all regular binary relationships B of type (1,n)(1,1),
(0,n)(1,1), (1,n)(0,1) and (0,n)(0,1) and for their relational schemes S and T
of the corresponding entity sets. Choose the relational scheme on the
"(1,1)"/"(0,1)"-side (here S) and insert there the primary key of T as a
foreign key. Also add the properties (if there are any) of B as attributes into
this relational scheme.
In this example you can see the application
of rule 4:
A binary relationship of type one to many/many to one
((1,n)(1,1)-, (0,n)(1,1)-, (1,n)(0,1)- und (0,n)(0,1)) is
chosen: "commissions"
Then we choose the entity set that is on the "(1,1) or
(0,1)"-side:
Advertisment(AdNo, Size,
Price, PublDate)
The primary key of the second entity set (eg. Customer) is
inserted as foreign key in the first relational scheme:
Advertisment(AdNo, Size, Price, PublDate,
ClientCustomerNo.)