Book contents
- Frontmatter
- Contents
- Introduction
- Part 1 Modeling Web Data
- 1 Data Model
- 2 XPath and XQuery
- 3 Typing
- 4 XML Query Evaluation
- 5 Putting into Practice: Managing an XML Database with eXist
- 6 Putting into Practice: Tree Pattern Evaluation Using SAX
- Part 2 Web Data Semantics and Integration
- Part 3 Building Web Scale Applications
- Bibliography
- Index
4 - XML Query Evaluation
from Part 1 - Modeling Web Data
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Introduction
- Part 1 Modeling Web Data
- 1 Data Model
- 2 XPath and XQuery
- 3 Typing
- 4 XML Query Evaluation
- 5 Putting into Practice: Managing an XML Database with eXist
- 6 Putting into Practice: Tree Pattern Evaluation Using SAX
- Part 2 Web Data Semantics and Integration
- Part 3 Building Web Scale Applications
- Bibliography
- Index
Summary
In previous chapters, we presented algorithms for evaluating XPath queries on XML documents in Ptime with respect to the combined size of the XML data and of the query. In this context, the entire document is assumed to fit within the main memory. However, very large XML documents may not fit in the memory available to the query processor at runtime. Since access to disk-resident data is orders of magnitude slower than access to the main memory, this dramatically changes the problem. When this is the case, performance-wise, the goal is not so much in reducing the algorithmic complexity of query evaluation but in designing methods reducing the number of disk accesses that are needed to evaluate a given query. The topic of this chapter is the efficient processing of queries of disk-resident XML documents.
We will use extensively depth-first tree traversals in the chapter. We briefly recall two classical definitions:
preorder: To traverse a nonempty binary tree in preorder, perform the following operations recursively at each node, starting with the root node: (1) Visit the root, (2) traverse the left subtree, (3) traverse the right subtree.
postorder: To traverse a nonempty binary tree in postorder, perform the following operations recursively at each node, starting with the root node: (1) Traverse the left subtree, (2) traverse the right subtree, (3) visit the root.
Figure 4.1 illustrates the issues raised by the evaluation of path queries on disk-resident XML documents.
- Type
- Chapter
- Information
- Web Data Management , pp. 95 - 115Publisher: Cambridge University PressPrint publication year: 2011