Conjunctive Query Containment over Trees

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


The complexity of containment and satisfiability of conjunctive queries over finite, unranked, labeled trees is studied with respect to the axes Child, nextSibling, their transitive and reflexive closures, and Following. For the containment problem a trichotomy is presented, classifying the problems as in PTIME, coNP-complete, or Π 2 P -complete. For the satisfiability problem most problems are classified as either in PTIME or NP-complete.


Free Variable Truth Assignment Conjunctive Query Query Graph XPath Query 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Berglund, A., Boag, S., Chamberlin, D., Fernández, M.F., Kay, M., Robie, J., Siméon, J.: XML Path Language (XPath) 2.0. Technical report, World Wide Web Consortium (January 2007),
  2. 2.
    Boag, S., Chamberlin, D., Fernández, M.F., Florescu, D., Robie, J., Siméon, J.: Xquery 1.0: An XML query language. Technical report, World Wide Web Consortium (January 2007),
  3. 3.
    Chan, E.P.F., van der Meyden, R.: Containment and optimization of object-preserving conjunctive queries. Siam J. on Computing 29(4), 1371–1400 (2000)zbMATHCrossRefGoogle Scholar
  4. 4.
    Clark, J., DeRose, S.: XML Path Language (XPath) version 1.0. Technical report, World Wide Web Consortium (1999),
  5. 5.
    Gallant, J., Maier, D., Storer, J.A.: On finding minimal length superstrings. JCSS 20(1), 50–58 (1980)zbMATHMathSciNetGoogle Scholar
  6. 6.
    Gottlob, G., Koch, C., Pichler, R., Segoufin, L.: The complexity of XPath query evaluation and XML typing. Journal of the ACM 52(2), 284–335 (2005)CrossRefMathSciNetGoogle Scholar
  7. 7.
    Gottlob, G., Koch, C., Schulz, K.U.: Conjunctive queries over trees. Journal of the ACM 53(2), 238–272 (2006)CrossRefMathSciNetGoogle Scholar
  8. 8.
    Hidders, J.: Satisfiability of XPath expressions. In: Lausen, G., Suciu, D. (eds.) DBPL 2003. LNCS, vol. 2921, pp. 21–36. Springer, Heidelberg (2004)Google Scholar
  9. 9.
    Kolaitis, P.G., Vardi, M.Y.: Conjunctive-query containment and constraint satisfaction. JCSS 61(2), 302–332 (2000)zbMATHMathSciNetGoogle Scholar
  10. 10.
    Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. Journal of the ACM 51(1), 2–45 (2004)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Neven, F., Schwentick, T.: On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logical Methods in Computer Science 2(3) (2006)Google Scholar
  12. 12.
    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
  13. 13.
    ten Cate, B., Lutz, C.: The complexity of query containment in expressive fragments of XPath 2.0. In: PODS 2007. 26th International Symposium on Principles of Database Systems, pp. 73–82 (2007)Google Scholar
  14. 14.
    Vansummeren, S.: On deciding well-definedness for query languages on trees. Journal of the ACM 54(4) (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

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

Personalised recommendations