Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- Part One GETTING STARTED
- Part Two RELATIONAL DATA EXCHANGE
- Part Three XML DATA EXCHANGE
- 10 The problem of XML data exchange
- 11 Patterns and mappings
- 12 Building solutions
- 13 Answering tuple queries
- 14 XML-to-XML queries
- 15 XML data exchange via relations
- 16 Endnotes to Part Three
- Part Four METADATA MANAGEMENT
- References
- Index
11 - Patterns and mappings
from Part Three - XML DATA EXCHANGE
Published online by Cambridge University Press: 05 June 2014
- Frontmatter
- Dedication
- Contents
- Preface
- Part One GETTING STARTED
- Part Two RELATIONAL DATA EXCHANGE
- Part Three XML DATA EXCHANGE
- 10 The problem of XML data exchange
- 11 Patterns and mappings
- 12 Building solutions
- 13 Answering tuple queries
- 14 XML-to-XML queries
- 15 XML data exchange via relations
- 16 Endnotes to Part Three
- Part Four METADATA MANAGEMENT
- References
- Index
Summary
XML schema mappings are expressed in terms of tree patterns, a simple query language for XML trees that plays the role analogous to that of conjunctive queries for relational databases. In this chapter we define the syntax and semantics of tree patterns, introduce a classification based on the features they use, and determine the complexity of basic computational problems. Then we do the same for XML schema mappings.
Tree patterns: classification and complexity
In XML trees information can be represented by means of data values, as well as the structure of the tree. Let us return to the example shown in Figure 10.1. The edge between the node storing Scotland and the node storing Mary I represents the fact that Mary I ruled Scotland. The value Charles I appearing twice informs us that Charles I ruled both Scotland and England. The node storing Mary I coming directly after the node storing James V corresponds to the fact that Mary I succeeded James V on the throne of Scotland. This already suggests the querying features needed to extract information from XML trees: child, next sibling, and their transitive closures: descendant, following sibling. We call these four features axes. It is also necessary to compare data values stored in different nodes.
In the light of PART TWO, a natural query language for XML trees is the family of conjunctive queries over XML trees viewed as databases over two sorts of objects: tree nodes, and data values. Relations in such representations include child, next sibling, and relations associating attribute values with nodes.
- Type
- Chapter
- Information
- Foundations of Data Exchange , pp. 143 - 157Publisher: Cambridge University PressPrint publication year: 2014