Skip to main content

Optimizing Conjunctive Queries over Trees Using Schema Information

  • Conference paper
Mathematical Foundations of Computer Science 2008 (MFCS 2008)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,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.

This work was supported by the DFG Grant SCHW678/3-1.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Benedikt, M., Fan, W., Geerts, F.: XPath satisfiability in the presence of DTDs. J. ACM 55(2) (2007)

    Google Scholar 

  2. Bjorklund, H., Martens, W., Schwentick, T.: Conjunctive query containment over trees. In: DBPL, pp. 66–80 (2007)

    Google Scholar 

  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. Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. ACM 28(1), 114–133 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  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. 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. Clark, J., Murata, M.: Relax NG specification (December 2001), http://www.relaxng.org/spec-20011203.html

  8. David, C.: Complexity of data tree patterns over XML documents. In: MFCS (to appear, 2008)

    Google Scholar 

  9. Gallant, J., Maier, D., Storer, J.A.: On finding minimal length superstrings. JCSS 20(1), 50–58 (1980)

    MATH  MathSciNet  Google Scholar 

  10. Geerts, F., Fan, W.: Satisfiability of XPath queries with sibling axes. In: DBPL, pp. 122–137 (2005)

    Google Scholar 

  11. Gottlob, G., Koch, C., Schulz, K.U.: Conjunctive queries over trees. J. ACM 53(2), 238–272 (2006)

    Article  MathSciNet  Google Scholar 

  12. Hidders, J.: Satisfiability of XPath expressions. In: DBPL, pp. 21–36 (2003)

    Google Scholar 

  13. Kolaitis, P.G., Vardi, M.Y.: Conjunctive query containment and constraint satisfaction. JCSS 61(2), 302–332 (2000)

    MATH  MathSciNet  Google Scholar 

  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. Marx, M.: XPath with conditional axis relations. In: EDBT, pp. 477–494 (2004)

    Google Scholar 

  16. Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)

    Article  MathSciNet  Google Scholar 

  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. Räihä, K.J., Ukkonen, E.: The shortest common supersequence problem over binary alphabet is NP-complete. TCS 16(2), 187–198 (1981)

    Article  MATH  Google Scholar 

  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. Wood, P.T.: Containment for XPath fragments under DTD constraints. In: ICDT (2003); Full version, obtained through personal communication

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Edward Ochmański Jerzy Tyszkiewicz

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Björklund, H., Martens, W., Schwentick, T. (2008). Optimizing Conjunctive Queries over Trees Using Schema Information. In: Ochmański, E., Tyszkiewicz, J. (eds) Mathematical Foundations of Computer Science 2008. MFCS 2008. Lecture Notes in Computer Science, vol 5162. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85238-4_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-85238-4_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-85237-7

  • Online ISBN: 978-3-540-85238-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics