Bag equivalence of XPath queries

When a query is evaluated under bag semantics, each answer is returned as many times as it has derivations. Bag semantics has long been recognized as important, especially when aggregation functions will be applied to query results. This paper is the first to focus on bag semantics for XPath queries. In particular, the problem of bag-equivalence of a large class of XPath queries (modeled as tree patterns) is explored. The queries can contain unions, branching, label wildcards, the vertical child and descendant axes, the horizontal following, following-sibling and immediately-following sibling axes, as well as positional (i.e., first and last) axes. Equivalence characterizations are provided, and their complexity is analyzed. As the descendent axis involves a recursive relationship, this paper is also the first to address bag equivalence over recursive queries, in any setting.

[1]  Carsten Lutz,et al.  The complexity of query containment in expressive fragments of XPath 2.0 , 2007, PODS.

[2]  Scott Boag,et al.  XQuery 1.0 : An XML Query Language , 2007 .

[3]  Dan Suciu,et al.  Containment and equivalence for a fragment of XPath , 2004, JACM.

[4]  Raghu Ramakrishnan,et al.  Containment of conjunctive queries: beyond relations as sets , 1995, TODS.

[5]  Steven J. DeRose,et al.  Xml pointer language (xpointer) version 1 , 2001 .

[6]  Surajit Chaudhuri,et al.  Optimization of real conjunctive queries , 1993, PODS '93.

[7]  toExcel Extensible Stylesheet Language: Xsl Version 1.0 , 1999 .

[8]  Alin Deutsch,et al.  Containment and Integrity Constraints for XPath , 2001, KRDB.

[9]  Martin D. Davis,et al.  Computability and Unsolvability , 1959, McGraw-Hill Series in Information Processing and Computers.

[10]  Werner Nutt,et al.  Equivalences among aggregate queries with negation , 2005, TOCL.

[11]  Steven J. DeRose,et al.  XML Pointer Language (XPointer) Version 1. 0. World Wide Web Consortium, Working Draft WD - xptr - 2 , 2001 .

[12]  Sara Cohen,et al.  Equivalence of queries that are sensitive to multiplicities , 2009, The VLDB Journal.

[13]  Sharon C. Adler Previous version: , 1997 .

[14]  Steven J. DeRose,et al.  Xml linking language (xlink), version 1. 0 , 2000, WWW 2000.

[15]  Werner Nutt,et al.  Deciding equivalences among conjunctive aggregate queries , 2007, JACM.

[16]  Peter T. Wood,et al.  Containment for XPath Fragments under DTD Constraints , 2003, ICDT.

[17]  Steven J. DeRose,et al.  XML Path Language (XPath) Version 1.0 , 1999 .

[18]  Thomas Schwentick,et al.  On the complexity of XPath containment in the presence of disjunction, DTDs, and variables , 2006, Log. Methods Comput. Sci..