A Comprehensive XQuery to SQL Translation using Dynamic Interval Encoding


The W3C XQuery language recommendation, based on a hierarchical and ordered document model, supports a wide variety of constructs and use cases. There is a diversity of approaches and strategies for evaluating XQuery expressions, in many cases only dealing with limited subsets of the language. In this paper we describe an implementation approach that handles XQuery with arbitrarily-nested FLWR expressions, element constructors and built-in functions (including structural comparisons). Our proposal maps an XQuery expression to a single equivalent SQL query using a novel <i>dynamic interval</i> encoding of a collection of XML documents as relations, augmented with information tied to the query evaluation environment. The dynamic interval technique enables (suitably enhanced) relational engines to produce predictably good query plans that do not preclude the use of sort-merge join query operators. The benefits are realized despite the challenges presented by intermediate results that create arbitrary documents and the need to preserve document order as prescribed by semantics of XQuery. Finally, our experimental results demonstrate that (native or relational) XML systems can benefit from the above technique to avoid a quadratic scale up penalty that effectively prevents the evaluation of nested FLWR expressions for large documents.

DOI: 10.1145/872757.872832

Extracted Key Phrases

11 Figures and Tables


Citations per Year

212 Citations

Semantic Scholar estimates that this publication has 212 citations based on the available data.

See our FAQ for additional information.

Cite this paper

@inproceedings{DeHaan2003ACX, title={A Comprehensive XQuery to SQL Translation using Dynamic Interval Encoding}, author={David DeHaan and David Toman and Mariano P. Consens and M. Tamer {\"{O}zsu}, booktitle={SIGMOD Conference}, year={2003} }