The XML data is order-sensitive. The order problem, that is how ordered XML documents and order-sensitive queries over it can be efficiently supported when mapped into the unordered relational data model, has not yet been adequately addressed. In this paper, we present a general approach for supporting order-sensitive XQuery-toSQL translation that works irrespective of the chosen XMLto-relational data mapping and the selected order-encoding method. Our approach, called XSOT, utilizes an orderaware XML algebra representation. We propose ordersensitive rewriting rules at the algebraic level to eliminate the dependency of the order determining operators on the implicit XML view order. Furthermore, we introduce series of order-sensitive optimization steps to transform the XML algebra tree for the purpose of efficient SQL translation. Lastly, we utilize a template-based approach using SQL-99 order features to generate SQL statements.
Ling Wang, Song Wang, Brian Murphy, Elke A. Runden