Information Technology Reference
In-Depth Information
Case 1: Disjoint Generalization
EERModel
DTDGraph
A1
A2
A1
A2
Entity A
Element A
d
|
Schema
Translation
A1
B1
A1
C1
Entity B
EntityC
B1
ElementB
Element C
C1
DTD
Relational Schema
<!ELEMENTA(B |C)>
<!ATTLISTAA1 CDATA#REQUIRED>
<!ATTLISTAA2 CDATA#REQUIRED>
<!ELEMENTBEMPTY>
<!ATTLISTBB1 CDATA#REQUIRED>
<!ELEMENTCEMPTY>
<!ATTLISTCC1 CDATA#REQUIRED>
RelationA( A1 ,A2)
RelationB(* A1 ,B1)
RelationC(* A1 ,C1)
Fig. 3.50 Schema translation of disjoint generalization
Case 2: Overlap Generalization
EERModel
DTDGraph
A1
A2
A1
A2
Entity A
ElementA
o
?
Schema
Translation
A1
B1
A1
C1
B1
C1
EntityB
Entity C
ElementB
ElementC
DTD
Relational Schema
<!ELEMENTA(B?, C?)>
<!ATTLISTAA1 CDATA#REQUIRED>
<!ATTLISTAA2 CDATA#REQUIRED>
<!ELEMENTBEMPTY>
<!ATTLISTBB1 CDATA#REQUIRED>
<!ELEMENTCEMPTY>
<!ATTLISTCC1 CDATA#REQUIRED>
Relation A( A1 ,A2)
Relation B(* A1 ,B1)
Relation C(* A1 ,C1)
Fig. 3.51 Schema translation of overlap generalization
Rule 8: Mapping Categorization from RDB to XML
A subclass table is a subset of a categorization of its superclass tables. In other
words, a subclass table is a subset of a union superclass tables such that the data
occurrence of a subclass table must appear in one and only one superclass table. In
DTD, we transform the super classes into elements, and their common subclass into
an element on the same level. Each element receives an additional “artificial” ID
 
Search WWH ::




Custom Search