Rewriting XQuery to Avoid Redundant Expressions based on Static Emulation of XML Store

Hiroyuki Kato,Soichiro Hidaka,Zhenjiang Hu,Yasunori Ishihara,Keisuke Nakano
2009-01-01
Abstract:Rewriting composite expressions based on eliminating intermedi- ate results generated by redundant expressions is a traditional op- timization technique (known as fusion) in both programming lan- guages community and database community. In XQuery, compos- ite expressions for node creation are typical in practice, for exam- ple, in data integration systems for XML with XQuery as schema mapping. We propose a fusion algorithm for this kind of compos- ite XQuery. The XQuery fusion is more difficult than the existing fusion, because naive elimination of node creations does not pre- serve document order. The document order plays an important role in XQuery. An XQuery expression is evaluated against an XML store which contains XML fragments that are created as interme- diate results, in addition to initial XML documents with their doc- ument order. So, the XML store is updated as the expression with node creations is evaluated. In this paper, we show that XML frag- ments created dynamically as intermediate results in a store can be emulated statically in such a way that rewriting XQuery to avoid redundant expressions is enabled. This emulation is achieved by using an adornment code called extended Dewey's assigned to the occurrences of expressions. By using this static emulation, our XQuery fusion avoids unnecessary expressions including node cre- ations while preserving the document order in XML.
What problem does this paper attempt to address?