Information Technology Reference
In-Depth Information
((5PRGHO
0DSSHG5HODWLRQDO6FKHPD
&XVWRPHU
5HODWLRQ&XVWRPHU &XVWRPHU
5HODWLRQ/RDQ6HFXULW\ 6HFXULW\
5HODWLRQ/RDQ&RQWUDFW /RDQ
5HODWLRQ&ROODWHUDO &XVWRPHU
6HFXULW\
/RDQ
0RUWJDJH
Q
Q
&ROODWHUDO
P
/RDQ
6HFXULW\
/RDQ
&RQWUDFW
Q
Fig. 3.20 Map ternary relationship of 2 m:n relationship from EER model to relational schema
((5PRGHO
0DSSHG5HODWLRQDO6FKHPD
&XVWRPHU
5HODWLRQ&XVWRPHU &XVWRPHU
5HODWLRQ/RDQ6HFXULW\ 6HFXULW\
5HODWLRQ/RDQ&RQWUDFW /RDQ
5HODWLRQ&ROODWHUDO &XVWRPHU
/RDQ
6HFXULW\
0RUWJDJH
P
P
&ROODWHUDO
/RDQ
6HFXULW\
/RDQ
&RQWUDFW
)LHOGVLQLWDOLFDUHFDQGLGDWHNH\
Fig. 3.21 Map ternary relationship of two 1:1 relationships from EER model to relational schema
Substep 3—Map aggregation, generalization, and categorization into relations.
An aggregation is derived when a relationship relation is further related to an-
other entity. This is treated as an entity to be related to the third entity in a relation-
ship. The mapping of such a relationship follows steps 1 and 2.
For disjoint generalization, superclass and subclass entities are mapped into rela-
tions on a one-to-one basis. The superclass entity key will be mapped as the primary
key for all the mapped relations. The “predicate” attribute will be mapped as an
attribute of the “generalized” relation. As an example, the disjoint generalization of
Fig. 3.10 can be mapped to the following relations:
5HODWLRQV
(PSOR\HH (PSOR\HH (PSOR\HHQDPHSDLGVFDOH
6DODULHGHPSOR\HH (PSOR\HH PRQWKVDODU\ERQXV
+RXUO\HPSOR\HH (PSOR\HH KRXUO\VDODU\RYHUWLPHSDLG
where paid-scale ("predicate" attribute) must be either "salaried" or
"hourly".
For an overlap generalization, the superclass and subclass entities are mapped into
Search WWH ::




Custom Search