Abstract
We show that several classes of tree patterns observe the independence of containing patterns property, that is, if a pattern is contained in the union of several patterns, then it is contained in one of them. We apply this property to two related problems on tree pattern rewriting using views. First, given view V and query Q, is it possible for Q to have an equivalent rewriting using V which is the union of two or more tree patterns, but not an equivalent rewriting which is a single pattern? This problem is of both theoretical and practical importance because, if the answer is no, then, to find an equivalent rewriting of a tree pattern using a view, we should use more efficient methods, such as the polynomial time algorithm of Xu and Özsoyoglu (2005), rather than try to find the union of all contained rewritings (which takes exponential time in the worst case) and test its equivalence to Q. Second, given a set S of views, we want to know under what conditions a subset S′ of S is redundant in the sense that for any query Q, the contained rewritings of Q using the views in S′ are contained in those using the views in S − S′. Solving this problem can help us to, for example, choose the minimum number of views to be cached, or better design the virtual schema in a mediated data integration system, or avoid repeated calculation in query optimization. For the first problem, we identify several classes of tree patterns for which the equivalent rewriting can be expressed as a single tree pattern. For the second problem, we present necessary and sufficient conditions for S′ to be redundant with respect to some classes of tree patterns. For both problems we consider extension to cases where there are rewritings using the intersection of multiple views and/or where a schema graph is present.
Similar content being viewed by others
References
Amer-Yahia, S., Cho, S., Lakshmanan, L.V.S., Srivastava, D.: Minimization of tree pattern queries. In: SIGMOD, pp. 497–508. ACM, New York, USA (2001)
Arion, A., Benzaken, V., Manolescu, I., Papakonstantinou, Y.: Structured materialized views for XML queries. In: VLDB, pp. 87–98. ACM, New York, USA (2007)
Balmin, A., Özcan, F., Beyer, K.S., Cochrane, R., Pirahesh, H.: A framework for using materialized XPath views in XML query processing. In: VLDB, pp. 60–71. Morgan Kaufmann, San Francisco, USA (2004)
Deutsch, A., Tannen, V.: Reformulation of XML queries and constraints. In: ICDT, pp. 225–241. Lecture Notes in Computer Science 2572, Springer, Germany (2003)
Halevy, A.Y.: Answering queries using views: a survey. VLDB J. 10(4), 270–294. Springer Berlin, Germany (2001)
Lakshmanan, L.V.S., Wang, H., Zhao, Z.J.: Answering tree pattern queries using views. In: VLDB, pp. 571–582. ACM, New York, USA (2006)
Lassez, J.-L., McAloon, K.: Independence of negative constraints. In: TAPSOFT, vol. 1, pp. 19–27. Lecture Notes in Computer Science 352, Springer-Verlag, Germany (1989)
Li, C., Bawa, M., Ullman, J.D.: Minimizing view sets without losing query-answering power. In: ICDT, pp. 99–113. Lecture Notes in Computer Science 1973, Springer, Germany (2001)
Mandhani, B., Suciu, D.: Query caching and view selection for XML databases. In: VLDB, pp. 469–480. ACM, New York, USA (2005)
Miklau, G., Suciu, D.: Containment and equivalence for an XPath fragment. In: PODS, pp. 65–76. ACM, New York, USA (2002)
Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45. ACM, New York, USA (2004)
Nash, A., Segoufin, L., Vianu, V.: Determinacy and rewriting of conjunctive queries using views: a progress report. In: ICDT, pp. 59–73. Lecture Notes in Computer Science 4353, Springer, Germany (2007)
Onose, N., Deutsch, A., Papakonstantinou, Y., Curtmola, E.: Rewriting nested XML queries using nested views. In: SIGMOD, pp. 443–454. ACM, New York, USA (2006)
Tajima, K., Fukui, Y.: Answering XPath queries over networks by sending minimal views. In: VLDB, pp. 48–59. Morgan Kaufmann, San Francisco, USA (2004)
Tang, J., Zhou, S.: A theoretic framework for answering XPath queries using views. In: XSym, pp. 18–33. Lecture Notes in Computer Science 3671, Springer, Germany (2005)
Tang, N., Yu, J.X., Özsu, M.T., Choi, B., Wong, K.-F.: Multiple materialized view selection for XPath query rewriting. In: ICDE, pp. 873–882. IEEE, USA (2008)
Wang, J., Topor, R.W., Maher, M.J.: Rewriting union queries using views. Constraints 10(3), 219–251. Springer, The Netherlands (2005)
Wang, J., Xu, J.Y.: Tree pattern rewriting using multiple views. In: DEXA, pp. 493–507. Lecture Notes in Computer Science 5181, Springer, Germany (2008)
Wang, J., Xu, J.Y., Liu, C.: Contained XPath rewriting using views revisited. In: WISE, pp. 410–425. Lecture Notes in Computer Science 5175, Springer, Germany (2008)
Xu, W., Özsoyoglu, Z.M.: Rewriting XPath queries using materialized views. In: VLDB, pp. 121–132. ACM, New York, USA (2005)
Yu, C., Popa, L.: Constraint-based XML query rewriting for data integration. In: SIGMOD, pp. 371–382. ACM, New York, USA (2004)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
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 12, 87–105 (2009). https://doi.org/10.1007/s11280-008-0057-x
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11280-008-0057-x