View-Based Query Answering and Query Containment over Semistructured Data
- 408 Downloads
The basic querying mechanism over semistructured data, namely regular path queries, asks for all pairs of objects that are connected by a path conforming to a regular expression. We consider conjunctive two-way regular path queries (C2RPQc’s), which extend regular path queries with two features. First, they add the inverse operator, which allows for expressing navigations in the database that traverse the edges both backward and forward. Second, they allow for using conjunctions of atoms, where each atom specifies that a regular path query with inverse holds between two terms, where each term is either a variable or a constant. For such queries we address the problem of view-based query answering, which amounts to computing the result of a query only on the basis of a set of views. More specifically, we present the following results: (1) We exhibit a mutual reduction between query containment and the recognition problem for view-based query answering for C2RPQc’s, i.e., checking whether a given tuple is in the certain answer to a query. Based on such a result, we can show that the problem of view-based query answering for C2RPQc’s is EXPSPACE-complete. (2) By exploiting techniques based on alternating two-way automata we show that for the restricted class of tree two-way regular path queries (in which the links between variables form a tree), query containment and view-based query answering are, rather surprisingly, in PSPACE (and hence, PSPACE-complete). (3) We present a technique to obtain view-based query answering algorithms that compute the whole set of tuples in the certain answer, instead of requiring to check each tuple separately. The technique is parametric wrt the query language, and can be applied both to C2RPQc’s and to tree-queries.
KeywordsRegular Expression Query Language Regular Language Conjunctive Query Tree Automaton
Unable to display preview. Download preview PDF.
- 1.S. Abiteboul, P. Buneman, and D. Suciu. Data on the Web: from Relations to Semistructured Data and XML. Morgan Kaufmann, Los Altos, 2000.Google Scholar
- 2.S. Abiteboul and O. Duschka. Complexity of answering queries using materialized views. In Proc. of PODS’98, pages 254–265, 1998.Google Scholar
- 3.S. Abiteboul, D. Quass, J. McHugh, J. Widom, and J. L. Wiener. The Lorel query language for semistructured data. Int. J. on Digital Libraries, 1(1):68–88, 1997.Google Scholar
- 4.F. N. Afrati, M. Gergatsoulis, and T. Kavalieros. Answering queries using materialized views with disjunction. In Proc. of ICDT’99, volume 1540 of LNCS, pages 435–452. Springer, 1999.Google Scholar
- 6.D. Barbará and T. Imieliński. Sleepers and workaholics: Caching strategies in mobile environments. In Proc. of ACM SIGMOD, pages 1–12, 1994.Google Scholar
- 7.C. Beeri, A. Y. Levy, and M.-C. Rousset. Rewriting queries using views in description logics. In Proc. of PODS’97, pages 99–108, 1997.Google Scholar
- 10.P. Buneman. Semistructured data. In Proc. of PODS’97, pages 117–121, 1997.Google Scholar
- 11.P. Buneman, S. Davidson, G. Hillebrand, and D. Suciu. A query language and optimization technique for unstructured data. In Proc. of ACM SIGMOD, pages 505–516, 1996.Google Scholar
- 12.D. Calvanese, G. De Giacomo, and M. Lenzerini. On the decidability of query containment under constraints. In Proc. of PODS’98, pages 149–158, 1998.Google Scholar
- 13.D. Calvanese, G. De Giacomo, and M. Lenzerini. Answering queries using views over description logics knowledge bases. In Proc. of AAAI 2000, pages 386–391, 2000.Google Scholar
- 14.D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. Rewriting of regular expressions and regular path queries. In Proc. of PODS’99, pages 194–204, 1999.Google Scholar
- 15.D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. Answering regular path queries using views. In Proc. of ICDE 2000, pages 389–398, 2000.Google Scholar
- 16.D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. Containment of conjunctive regular path queries with inverse. In Proc. of KR 2000, pages 176–185, 2000.Google Scholar
- 17.D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. Query processing using views for regular path queries with inverse. In Proc. of PODS 2000, pages 58–66, 2000.Google Scholar
- 18.D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Y. Vardi. View-based query processing and constraint satisfaction. In Proc. of LICS 2000, pages 361–371, 2000.Google Scholar
- 19.D. Chamberlin, D. Florescu, J. Robie, J. Simeon, and M. Stefanescu. XQuery: A query language for XML. W3C Working Draft, Feb. 2001. Available at http://www.w3.org/TR/xquery.
- 20.E. P. F. Chan. Containment and minimization of positive conjunctive queries in oodb’s. In Proc. of PODS’92, pages 202–211, 1992.Google Scholar
- 22.A. K. Chandra and P. M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In Proc. of STOC’77, pages 77–90, 1977.Google Scholar
- 23.S. Chaudhuri, S. Krishnamurthy, S. Potarnianos, and K. Shim. Optimizing queries with materialized views. In Proc. of ICDE’95, Taipei (Taiwan), 1995.Google Scholar
- 24.S. Chaudhuri and M. Y. Vardi. On the equivalence of recursive and nonrecursive Datalog programs. In Proc. of PODS’92, pages 55–66, 1992.Google Scholar
- 25.C. Chekuri and A. Rajaraman. Conjunctive query containment revisited. In Proc. of ICDT’97, pages 56–70, 1997.Google Scholar
- 26.J. Clark and S. DeRose. XML Path Language (XPath) version 1.0-W3C recommendation 16 november 1999. Technical report, World Wide Web Consortium, 1999. Available at http://www.w3.org/TR/1999/REC-xpath-19991116.
- 27.S. Cohen, W. Nutt, and A. Serebrenik. Rewriting aggregate queries using views. In Proc. of PODS’99, pages 155–166, 1999.Google Scholar
- 29.A. Deutsch, M. F. Fernandez, D. Florescu, A. Levy, and D. Suciu. XML-QL: A query language for XML. Submission to the World Wide Web Consortium, Aug. 1998. Available at http://www.w3.org/TR/NOTE-xml-ql.
- 30.A. Deutsch and V. Tannen. Optimization properties for classes of conjunctive regular path queries. In Proc. of DBPL 2001, 2001.Google Scholar
- 31.O. M. Duschka and M. R. Genesereth. Answering recursive queries using views. In Proc. of PODS’97, pages 109–116, 1997.Google Scholar
- 32.M. F. Fernandez, D. Florescu, J. Kang, A. Y. Levy, and D. Suciu. Catching the boat with strudel: Experiences with a web-site management system. In Proc. of ACM SIGMOD, pages 414–425, 1998.Google Scholar
- 33.D. Florescu, A. Levy, and D. Suciu. Query containment for conjunctive queries with regular expressions. In Proc. of PODS’98, pages 139–148, 1998.Google Scholar
- 34.G. Grahne and A. O. Mendelzon. Tableau techniques for querying information sources through global schemas. In Proc. of ICDT’99, volume 1540 of LNCS, pages 332–347. Springer, 1999.Google Scholar
- 35.S. Grumbach, M. Rafanelli, and L. Tininini. Querying aggregate data. In Proc. of PODS’99, pages 174–184, 1999.Google Scholar
- 40.A. Y. Levy, A. O. Mendelzon, Y. Sagiv, and D. Srivastava. Answering queries using views. In Proc. of PODS’95, pages 95–104, 1995.Google Scholar
- 42.A. Y. Levy and D. Suciu. Deciding containment for queries with complex objects. In Proc. of PODS’97, pages 20–31, 1997.Google Scholar
- 43.J. McHugh and J. Widom. Optimizing branching path expressions. Technical report, Stanford University, 1999. Available at http://www-db.stanford.edu[chexxx]penalty-[chexxx]@M/pub/papers/mp.ps.
- 44.T. Milo and D. Suciu. Index structures for path expressions. In Proc. of ICDT’99, volume 1540 of LNCS, pages 277–295. Springer, 1999.Google Scholar
- 45.Y. Papakonstantinou and V. Vianu. DTD inference for views of XML data. In Proc. of PODS 2000, pages 35–46, 2000.Google Scholar
- 46.A. Rajaraman, Y. Sagiv, and J. D. Ullman. Answering queries using templates with binding patterns. In Proc. of PODS’95, 1995.Google Scholar
- 50.D. Srivastava, S. Dar, H. V. Jagadish, and A. Levy. Answering queries with aggregation using views. In Proc. of VLDB’96, pages 318–329, 1996.Google Scholar
- 52.J. D. Ullman. Information integration using logical views. In Proc. of ICDT’97, volume 1186 of LNCS, pages 19–40. Springer, 1997.Google Scholar
- 53.R. van der Meyden. The Complexity of Querying Indefinite Information. PhD thesis, Rutgers University, 1992.Google Scholar
- 55.V. Vianu. A web odyssey: From Codd to XML. In Proc. of PODS 2001, 2001. Invited talk.Google Scholar
- 56.J. Widom (ed.). Special issue on materialized views and data warehousing. IEEE Bull. on Data Engineering, 18(2), 1995.Google Scholar
- 57.J. Widom (ed.). Special issue on materialized views and data warehousing. IEEE Bull. on Data Engineering, 22(3), 1999.Google Scholar
- 58.M. Yannakakis. Algorithms for acyclic database schemes. In Proc. of VLDB’81, pages 82–94, 1981.Google Scholar