Information Technology Reference
In-Depth Information
a child table in a one-to-many occurrence. Many-to-many cardinality indicates that
a primary key of a parent table is addressed by many foreign keys of a child table
and vice versa. This pair of tables are thus in a many-to-many cardinality. In DTD,
we translate one-to-one cardinality into parent and child element (Fig. 3.45 ) and
one-to-many cardinality into a parent and child element with multiple occurrences
(Fig. 3.46 ). In many-to-many cardinality, it is mapped into DTD of a hierarchy
structure with ID and IDREF as shown in Fig. 3.47 .
Case 1: One-to-One Cardinality
((50RGHO
'7'*UDSK
$
$
$
$
(QWLW\$
(OHPHQW$
5
6FKHPD
%
%
%
%
(QWLW\%
(OHPHQW%
7UDQVODWLRQ
'7'
5HODWLRQDO6FKHPD
(/(0(17 $%!
$77/,67$$&'$7$5(48,5('!
$77/,67$$&'$7$5(48,5('!
(/(0(17 %(037<!
$77/,67%%&'$7$5(48,5('!
$77/,67%%&'$7$5(48,5('!
5HODWLRQ$ $ $
5HODWLRQ% % %$
Fig. 3.45 Schema translation of one-to-one cardinality
Case 2: One-to-Many Cardinality
((50RGHO
'7'*UDSK
$
$
$
$
(QWLW\$
(OHPHQW$
5
6FKHPD
Q
7UDQVODWLRQ
%
%
%
%
(QWLW\%
(OHPHQW%
'7'
5HODWLRQDO6FKHPD
(/(0(17 $%!
$77/,67$$&'$7$5(48,5('!
$77/,67$$&'$7$5(48,5('!
(/(0(17 %(037<!
$77/,67%%&'$7$5(48,5('!
$77/,67%%&'$7$5(48,5('!
5HODWLRQ$ $ $
5HODWLRQ% % %$
Search WWH ::




Custom Search