Advertisement

Optimizing Conjunctive Queries over Trees Using Schema Information

  • Henrik Björklund
  • Wim Martens
  • Thomas Schwentick
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5162)

Abstract

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.

Keywords

Conjunctive Query Tree Automaton Schema Information XPath Query XPath Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Benedikt, M., Fan, W., Geerts, F.: XPath satisfiability in the presence of DTDs. J. ACM 55(2) (2007)Google Scholar
  2. 2.
    Bjorklund, H., Martens, W., Schwentick, T.: Conjunctive query containment over trees. In: DBPL, pp. 66–80 (2007)Google Scholar
  3. 3.
    Bojanczyk, M., David, C., Muscholl, A., Schwentick, T., Segoufin, L.: Two-variable logic on data trees and XML reasoning. In: PODS, pp. 10–19 (2006)Google Scholar
  4. 4.
    Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. ACM 28(1), 114–133 (1981)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational data bases. In: STOC, pp. 77–90 (1977)Google Scholar
  6. 6.
    Clark, J., De Rose, S.: XML Path Language (XPath) version 1.0. Technical report, World Wide Web Consortium (1999), http://www.w3.org/TR/xpath/
  7. 7.
    Clark, J., Murata, M.: Relax NG specification (December 2001), http://www.relaxng.org/spec-20011203.html
  8. 8.
    David, C.: Complexity of data tree patterns over XML documents. In: MFCS (to appear, 2008)Google Scholar
  9. 9.
    Gallant, J., Maier, D., Storer, J.A.: On finding minimal length superstrings. JCSS 20(1), 50–58 (1980)zbMATHMathSciNetGoogle Scholar
  10. 10.
    Geerts, F., Fan, W.: Satisfiability of XPath queries with sibling axes. In: DBPL, pp. 122–137 (2005)Google Scholar
  11. 11.
    Gottlob, G., Koch, C., Schulz, K.U.: Conjunctive queries over trees. J. ACM 53(2), 238–272 (2006)CrossRefMathSciNetGoogle Scholar
  12. 12.
    Hidders, J.: Satisfiability of XPath expressions. In: DBPL, pp. 21–36 (2003)Google Scholar
  13. 13.
    Kolaitis, P.G., Vardi, M.Y.: Conjunctive query containment and constraint satisfaction. JCSS 61(2), 302–332 (2000)zbMATHMathSciNetGoogle Scholar
  14. 14.
    Lakshmanan, L.V.S., Ramesh, G., Wang, H., Zhao, Z.: On testing satisfiability of tree pattern queries. In: VLDB, pp. 120–131 (2004)Google Scholar
  15. 15.
    Marx, M.: XPath with conditional axis relations. In: EDBT, pp. 477–494 (2004)Google Scholar
  16. 16.
    Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Neven, F., Schwentick, T.: On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. LMCS 2(3) (2006)Google Scholar
  18. 18.
    Räihä, K.J., Ukkonen, E.: The shortest common supersequence problem over binary alphabet is NP-complete. TCS 16(2), 187–198 (1981)zbMATHCrossRefGoogle Scholar
  19. 19.
    Cate, B.t., Lutz, C.: The complexity of query containment in expressive fragments of XPath 2.0. In: PODS, pp. 73–82 (2007)Google Scholar
  20. 20.
    Wood, P.T.: Containment for XPath fragments under DTD constraints. In: ICDT (2003); Full version, obtained through personal communicationGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Henrik Björklund
    • 1
  • Wim Martens
    • 1
  • Thomas Schwentick
    • 1
  1. 1.Technical University of Dortmund 

Personalised recommendations