Database Reference
In-Depth Information
15
XML data exchange via relations
So far we have tacitly assumed that one uses a native XML DBMS for performing data
exchange tasks. However, this is not the only (and perhaps not even the most common)
route: XML documents are often stored in relational DBMSs. Thus, it is natural to ask
whether relational data exchange techniques, developed in PART TWO , can be used to
perform XML data exchange tasks.
In XML terminology, translations from XML to relations are referred to as shredding of
documents, whereas translations going the other way, from relations to XML, are referred
to as publishing . Thus, to use relational technology for XML data exchange tasks, we can
employ a two-step approach:
1. shred XML data into relations;
2. then apply a relational data-exchange engine (and publish the result back as an XML
document if necessary).
The seems very natural, but the key question is whether it will work correctly .Thatis,are
we guaranteed to have the same result as we would have gotten had we implemented a
native XML data-exchange system? This is what we investigate in this chapter. It turns out
that we need to impose restrictions on XML schema mappings to enable this approach, and
the restrictions are similar to those we needed to ensure tractability of data exchange tasks
in the previous chapters.
15.1 Translations and correctness
We now describe what we mean by correctness of translations that enable a relational
data exchange system to perform XML data exchange tasks. These will be formalized as
five requirements, ensuring correctness of translations of schemas, documents, queries,
mappings, and certain answers.
Assume for now that that we have a translation
) that can be applied to (a) XML
schemas, (b) XML documents, (c) XML schema mappings, and (d) XML queries. Then
the concept of correctness of such a translation is informally depicted in Figure 15.1 .
That is, suppose we start with an XML document S and an XML schema mapping
σ
(
·
M
.
Search WWH ::




Custom Search