Skip to main content
Log in

Least common container of tree pattern queries and its applications

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

Tree patterns represent important fragments of XPath. In this paper, we show that some classes \({\mathcal{C}}\) of tree patterns exhibit such a property that, given a finite number of compatible tree patterns \({P_1, \ldots, P_n\in \mathcal{C}}\), there exists another pattern P such that P 1, . . . , P n are all contained in P, and for any tree pattern \({Q\in \mathcal{C}}\), P 1, . . . , P n are all contained in Q if and only if P is contained in Q. We experimentally demonstrate that the pattern P is usually much smaller than P 1, . . . , P n combined together. Using the existence of P above, we show that testing whether a tree pattern, P, is contained in another, \({Q\in \mathcal{C}}\), under an acyclic schema graph G, can be reduced to testing whether P G , a transformed version of P, is contained in Q without any schema graph, provided that the distinguished node of P is not labeled *. We then show that, under G, the maximal contained rewriting (MCR) of a tree pattern Q using a view V can be found by finding the MCR of Q using V G without G, when there are no *-nodes on the distinguished path of V and no *-nodes in Q.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Amer-Yahia, S., Cho, S., Lakshmanan, L.V.S., Srivastava, D.: Minimization of tree pattern queries. In: SIGMOD, pp. 497–508 (2001)

  2. Amer-Yahia S., Cho S., Lakshmanan L.V.S., Srivastava D.: Tree pattern query minimization. VLDB J. 11(4), 315–331 (2002)

    Article  MATH  Google Scholar 

  3. Benedikt M., Fan W., Kuper G.: Structural properties of XPath fragments. Theor. Comput. Sci. 336(1), 3–31 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  4. Lakshmanan, L.V., Ramesh, G., Hui (Wendy) Wang, Z.J.Z.: On testing satisfiabilty of tree patterns. In: VLDB, pp. 120–131 (2004)

  5. Lakshmanan, L.V.S., Wang, H., Zhao, Z.J.: Answering tree pattern queries using views. In: VLDB, pp. 571–582 (2006)

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

    Article  MathSciNet  Google Scholar 

  7. Neven F., Schwentick T.: On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logic. Methods Comput. Sci. 2(3), 1–30 (2006)

    MathSciNet  Google Scholar 

  8. Ramanan, P.: Efficient algorithms for minimizing tree pattern queries. In: SIGMOD Conference, pp. 299–309 (2002)

  9. Schwentick T.: XPath query containment. SIGMOD Record. 33(1), 101–109 (2004)

    Article  MathSciNet  Google Scholar 

  10. Tang J., Fu A.W.: Query rewriting using views for XPath queries, framework and methodoloies. Inf. Syst. 35, 315–334 (2010)

    Article  MATH  Google Scholar 

  11. ten Cate, B., Lutz, C.: The complexity of query containment in expressive fragments of XPath 2.0. J. ACM 56(6) (2009)

  12. Wang, J., Li, J., Yu, J.X.: Answering tree pattern queries using views: a revisit. In: EDBT, pp. 153–164 (2011)

  13. Wang J., Yu J.X., Liu C.: Independence of containing patterns property and its application in tree pattern query rewriting using views. World Wide Web J. 12(1), 87–105 (2009)

    Article  Google Scholar 

  14. Wood, P.T.: Minimising simple XPath expressions. In: WebDB, pp. 13–18 (2001)

  15. Wood, P.T.: Containment for XPath fragments under DTD constraints. In: ICDT, pp. 300–314 (2003)

  16. Xu, W., Özsoyoglu, Z.M.: Rewriting XPath queries using materialized views. In: VLDB, pp. 121–132 (2005)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Junhu Wang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wang, J., Yu, J.X., Pang, C. et al. Least common container of tree pattern queries and its applications. Acta Informatica 49, 173–202 (2012). https://doi.org/10.1007/s00236-012-0155-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-012-0155-1

Keywords

Navigation