Temporal Slicing in the Evaluation of XML Queries [chapter]

Dengfeng Gao, Richard T. Snodgrass
2003 Proceedings 2003 VLDB Conference  
As with relational data, XML data changes over time with the creation, modification, and deletion of XML documents. Expressing queries on timevarying (relational or XML) data is more difficult than writing queries on nontemporal data. In this paper, we present a temporal XML query language, ¢ XQuery, in which we add valid time support to XQuery by minimally extending the syntax and semantics of XQuery. We adopt a stratum approach which maps a ¢ XQuery query to a conventional XQuery. The paper
more » ... cuses on how to perform this mapping, in particular, on mapping sequenced queries, which are by far the most challenging. The critical issue of supporting sequenced queries (in any query language) is time-slicing the input data while retaining period timestamping. Timestamps are distributed throughout an XML document, rather than uniformly in tuples, complicating the temporal slicing while also providing opportunities for optimization. We propose four optimizations of our initial maximally-fragmented time-slicing approach: selected node slicing, copy-based perexpression slicing, in-place per-expression slicing, and idiomatic slicing, each of which reduces the number of constant periods over which the query is evaluated. While performance tradeoffs clearly depend on the underlying XQuery engine, we argue that there are queries that favor each of the five approaches. ¢ XQuery utilizes the data model of XQuery. The few reserved words added to XQuery indicate three different kinds of valid time queries. Representational queries have the same semantics with XQuery, ensuring that ¢ XQuery is upward compatible with XQuery. New syntax for current and sequenced queries makes these queries easier to write. We carefully made ¢ XQuery compatible with XQuery to ensure the smooth migration from nontemporal application to temporal application; this compatibility also simplifies the semantics and its implementation. To implement ¢ XQuery, we adopt the stratum approach, in which a stratum accepts ¢ XQuery expressions and maps each to a semantically equivalent XQuery expression. This XQuery expression is passed to an XQuery engine. Once the XQuery engine obtains the result, the stratum possibly performs some additional processing and returns the result to the user. The advantage of this approach is that we can exploit the existing techniques in an XQuery engine such as the query optimization and query evaluation. The stratum
doi:10.1016/b978-012722442-8/50062-8 dblp:conf/vldb/GaoS03 fatcat:pai5rsoxgnfr3fpuc6p4z4qlmu