Information Technology Reference
In-Depth Information
the other two sibling elements. Each pointer links two elements together to form a
one-to-many cardinality with the pointer element on “many” side, and the pointed
element on “one” side. Two pairs of one-to-many elements with the same “many”
side element can form a many-to-many cardinality between the two elements on the
“one” side.
When we integrate XML schemas, we must locate their connectivity according
to their relevance. A simple relevancy is to find their equivalent elements with the
same key values. If such equivalent elements are found in the two to-be-integrated
XML schemas, we can perform the union of the two equivalent elements into one
element. In other words, if two elements key value matched, then we can integrate
the two XML schemas with their connectivity of the union element. We will provide
a case study 2 in this situation.
If the key values of all elements cannot be matched between the two to-be-in-
tegrated XML schemas, we need to impose an artifact root element to connect the
two schemas together as an integrated XML schema. We will provide a case study
1 in this situation.
If there are multiple pairs of domain equivalent elements found in the two to-be-
integrated XML schemas, then we can perform union of the first pair of equivalent
elements as one element, and factorize the other pair of equivalent elements by
adding a new branch element under the root element, such that the key-matched
elements referring to this new branch element under root element. We will provide
a case 3 study in this situation.
In the following three case studies, we will integrate two XML schemas A and
B by matching their equivalent elements key values. Then, we will query the inte-
grated XML schema and document with a global query which will be decomposed
into subqueries such that each subquery will be executed on one of the schema A or
schema B for access.
In the schema integration, it will integrate two XML schemas, which are schema
A and schema B. During the integration, it will try to find the matching element be-
tween schema A and schema B. For the matching element condition, it means both
elements have the same key in XSD. Otherwise, the no-matching element condition
means both elements do not have the same key in XSD.
Case 1. No Matching Element Between Schemas A and B
Step 1. Artificial root creation
In this step, it shows that the elements in schemas A and B are no-matching ele-
ments. The solution is to make an artificial root element to link the root of schemas
A and B, while the roots of schemas A and B become child element of the new root
(Fig. 7.23 ).
Step 2. Path Expression to Access Integrated XML Document
In this step, the query statement is analyzed as path expression without predicates.
The last element E A2 in path expression will be set as root of the integrated XML
document. As the last element E A2 belongs to document A, the subquery will not be
generated. The query is executed without decomposition (Fig. 7.24 ).
Search WWH ::




Custom Search