Optimizing Conjunctive Queries over Trees Using Schema Information

We study the containment, satisfiability, and validity problems for conjunctive queries over trees with respect to a schema. We show that conjunctive query containment and validity are 2EXPTIME-complete w.r.t. a schema (DTD or Relax NG). Furthermore, we show that satisfiability for conjunctive queries w.r.t. a schema can be decided in NP. The problem is NP-hard already for queries using only one kind of axis. Finally, we consider conjunctive queries that can test for equalities and inequalities of data values. Here, satisfiability and validity are decidable, but containment is undecidable, even without schema information. On the other hand, containment w.r.t. a schema becomes decidable again if the "larger" query is not allowed to use both equalities and inequalities.

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

[2]  Oasis RELAX NG Specification , 2001 .

[3]  Laks V. S. Lakshmanan,et al.  On Testing Satisfiability of Tree Pattern Queries , 2004, VLDB.

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

[5]  Claire David,et al.  Complexity of Data Tree Patterns over XML Documents , 2008, MFCS.

[6]  Maarten Marx,et al.  XPath with Conditional Axis Relations , 2004, EDBT.

[7]  Emil L. Post A variant of a recursively unsolvable problem , 1946 .

[8]  Thomas Schwentick,et al.  Two-variable logic on data trees and XML reasoning , 2009, JACM.

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

[10]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[11]  Masako Takahashi,et al.  Generalizations of Regular Sets and Their Applicatin to a Study of Context-Free Languages , 1975, Inf. Control..

[12]  Michael Benedikt,et al.  XPath satisfiability in the presence of DTDs , 2008, JACM.

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

[14]  David Maier,et al.  On Finding Minimal Length Superstrings , 1980, J. Comput. Syst. Sci..

[15]  Esko Ukkonen,et al.  The Shortest Common Supersequence Problem over Binary Alphabet is NP-Complete , 1981, Theor. Comput. Sci..

[16]  Jan Hidders Satisfiability of XPath Expressions , 2003, DBPL.

[17]  Georg Gottlob,et al.  Conjunctive queries over trees , 2004, JACM.

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

[19]  Phokion G. Kolaitis,et al.  Conjunctive-query containment and constraint satisfaction , 1998, PODS.

[20]  Wenfei Fan,et al.  Satisfiability of XPath Queries with Sibling Axes , 2005, DBPL.