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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Benedikt, M., Fan, W., Geerts, F.: XPath satisfiability in the presence of DTDs. J. ACM 55(2) (2007)
Bjorklund, H., Martens, W., Schwentick, T.: Conjunctive query containment over trees. In: DBPL, pp. 66–80 (2007)
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)
Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. ACM 28(1), 114–133 (1981)
Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational data bases. In: STOC, pp. 77–90 (1977)
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/
Clark, J., Murata, M.: Relax NG specification (December 2001), http://www.relaxng.org/spec-20011203.html
David, C.: Complexity of data tree patterns over XML documents. In: MFCS (to appear, 2008)
Gallant, J., Maier, D., Storer, J.A.: On finding minimal length superstrings. JCSS 20(1), 50–58 (1980)
Geerts, F., Fan, W.: Satisfiability of XPath queries with sibling axes. In: DBPL, pp. 122–137 (2005)
Gottlob, G., Koch, C., Schulz, K.U.: Conjunctive queries over trees. J. ACM 53(2), 238–272 (2006)
Hidders, J.: Satisfiability of XPath expressions. In: DBPL, pp. 21–36 (2003)
Kolaitis, P.G., Vardi, M.Y.: Conjunctive query containment and constraint satisfaction. JCSS 61(2), 302–332 (2000)
Lakshmanan, L.V.S., Ramesh, G., Wang, H., Zhao, Z.: On testing satisfiability of tree pattern queries. In: VLDB, pp. 120–131 (2004)
Marx, M.: XPath with conditional axis relations. In: EDBT, pp. 477–494 (2004)
Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004)
Neven, F., Schwentick, T.: On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. LMCS 2(3) (2006)
Räihä, K.J., Ukkonen, E.: The shortest common supersequence problem over binary alphabet is NP-complete. TCS 16(2), 187–198 (1981)
Cate, B.t., Lutz, C.: The complexity of query containment in expressive fragments of XPath 2.0. In: PODS, pp. 73–82 (2007)
Wood, P.T.: Containment for XPath fragments under DTD constraints. In: ICDT (2003); Full version, obtained through personal communication
Author information
Authors and Affiliations
Editor information
Rights 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)