Information Technology Reference
In-Depth Information
Rule 4: Mapping Aggregation from RDB to XML
In converting aggregation relational tuples into XML instances, we must ensure
the component relational tuples are converted into the component elements under a
group element in an XML document (Fig. 4.19 ).
Rule 5: Mapping ISA relationship from RDB to XML
In converting isa relational tuples into XML instances, we must ensure that the
subclass relational tuples are converted into child element instances without the
duplication of superclass relational key (Fig. 4.20 ).
Rule 6: Mapping Generalization from RDB to XML
Case 1: Disjoint Generalization
Similar to an isa relationship, in converting generalization relational tuples into
XML instances, we must ensure that the subclass relational tuples are converted
into child element instances without the duplication of superclass relational key.
Relation A
A1
a11
a12
A2
a21
a22
XMLDocument
<A A1="a11" A2="a21">
<Group>
<B B1="b11" B2="b21" B_id="1"></B>
<R1 B_idref="1" C_idref="2"></R1>
<C C1="c11" C2="c21" C_id="2"></C>
</Group>
</A>
Relation B
B1
b11
B2
b21
b12
b22
Data
Relation C
C1
c11
Conversion
C2
c21
<A A1="a12" A2="a22">
<Group>
<B B1="b12" B2="b22" B_id="3"></B>
<R1 B_idref="3" C_idref="4"></R1>
<C C1="c12" C2="c22" C_id="4"></C>
</Group>
</A>
c12
c22
Relation R1
* B1
b11
* C1
c11
*A1
a11
b12
c12
a12
Fig. 4.19 Aggregation: data conversion
Relation A
A1
a11
a12
XMLDocument
A2
a21
a22
<A A1="a11" A2="a21">
<B B1="b11" ></B>
</A>
Data
Relation B
* A1
a11
Conversion
B1
b11
<A A1="a12" A2="a22"></A>
Search WWH ::




Custom Search