Advertisement

View-Based Query Answering and Query Containment over Semistructured Data

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2397)

Abstract

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.

Keywords

Regular Expression Query Language Regular Language Conjunctive Query Tree Automaton 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 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. 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
  5. 5.
    A. V. Aho, Y. Sagiv, and J. D. Ullman. Equivalence among relational expressions. SIAM J. on Computing, 8:218–246, 1979.zbMATHCrossRefMathSciNetGoogle Scholar
  6. 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. 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
  8. 8.
    J.-C. Birget. State-complexity of finite-state devices, state compressibility and incompressibility. Mathematical Systems Theory, 26(3):237–269, 1993.zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    J. A. Brzozowski and E. Leiss. Finite automata and sequential networks. Theor. Comp. Sci., 10:19–35, 1980.zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    P. Buneman. Semistructured data. In Proc. of PODS’97, pages 117–121, 1997.Google Scholar
  11. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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
  21. 21.
    A. K. Chandra, D. C. Kozen, and L. J. Stockmeyer. Alternation. J. of the ACM, 28(1):114–133, 1981.zbMATHCrossRefMathSciNetGoogle Scholar
  22. 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. 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. 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. 25.
    C. Chekuri and A. Rajaraman. Conjunctive query containment revisited. In Proc. of ICDT’97, pages 56–70, 1997.Google Scholar
  26. 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. 27.
    S. Cohen, W. Nutt, and A. Serebrenik. Rewriting aggregate queries using views. In Proc. of PODS’99, pages 155–166, 1999.Google Scholar
  28. 28.
    A. C. K. David S. Johnson. Testing containment of conjunctive queries under functional and inclusion dependencies. J. of Computer and System Sciences, 28(1):167–189, 1984.zbMATHCrossRefGoogle Scholar
  29. 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. 30.
    A. Deutsch and V. Tannen. Optimization properties for classes of conjunctive regular path queries. In Proc. of DBPL 2001, 2001.Google Scholar
  31. 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. 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. 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. 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. 35.
    S. Grumbach, M. Rafanelli, and L. Tininini. Querying aggregate data. In Proc. of PODS’99, pages 174–184, 1999.Google Scholar
  36. 36.
    J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison Wesley Publ. Co., Reading, Massachussetts, 1979.zbMATHGoogle Scholar
  37. 37.
    A. C. Klug. On conjunctive queries containing inequalities. J. of the ACM, 35(1):146–160, 1988.zbMATHCrossRefMathSciNetGoogle Scholar
  38. 38.
    O. Kupferman, N. Piterman, and M. Y. Vardi. Extended temporal logic revisited. In Proc. of CONCUR 2001, volume 2154 of LNCS, pages 519–535. Springer, 2001.CrossRefGoogle Scholar
  39. 39.
    R. E. Ladner, R. J. Lipton, and L. J. Stockmeyer. Alternating pushdown and stack automata. SIAM J. on Computing, 13(1):135–155, 1984.zbMATHCrossRefMathSciNetGoogle Scholar
  40. 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
  41. 41.
    A. Y. Levy and M.-C. Rousset. Combining Horn rules and description logics in CARIN. Artificial Intelligence, 104(1–2):165–209, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  42. 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. 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. 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. 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. 46.
    A. Rajaraman, Y. Sagiv, and J. D. Ullman. Answering queries using templates with binding patterns. In Proc. of PODS’95, 1995.Google Scholar
  47. 47.
    Y. Sagiv and M. Yannakakis. Equivalences among relational expressions with the union and difference operators. J. of the ACM, 27(4):633–655, 1980.zbMATHCrossRefMathSciNetGoogle Scholar
  48. 48.
    H. Seidl. Deciding equivalence of finite tree automata. SIAM J. on Computing, 19(3):424–437, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  49. 49.
    O. Shmueli. Equivalence of Datalog queries is undecidable. J. of Logic Programming, 15(3):231–241, 1993.zbMATHCrossRefMathSciNetGoogle Scholar
  50. 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
  51. 51.
    O. G. Tsatalos, M. H. Solomon, and Y. E. Ioannidis. The GMAP: A versatile tool for phyisical data independence. VLDB Journal, 5(2):101–118, 1996.CrossRefGoogle Scholar
  52. 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. 53.
    R. van der Meyden. The Complexity of Querying Indefinite Information. PhD thesis, Rutgers University, 1992.Google Scholar
  54. 54.
    M. Y. Vardi. A note on the reduction of two-way automata to one-way automata. Information Processing Letters, 30(5):261–264, 1989.zbMATHCrossRefMathSciNetGoogle Scholar
  55. 55.
    V. Vianu. A web odyssey: From Codd to XML. In Proc. of PODS 2001, 2001. Invited talk.Google Scholar
  56. 56.
    J. Widom (ed.). Special issue on materialized views and data warehousing. IEEE Bull. on Data Engineering, 18(2), 1995.Google Scholar
  57. 57.
    J. Widom (ed.). Special issue on materialized views and data warehousing. IEEE Bull. on Data Engineering, 22(3), 1999.Google Scholar
  58. 58.
    M. Yannakakis. Algorithms for acyclic database schemes. In Proc. of VLDB’81, pages 82–94, 1981.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  1. 1.Dipartimento di Informatica e SistemisticaUniversità di Roma “La Sapienza”RomaItaly
  2. 2.Department of Computer ScienceRice UniversityHoustonUSA

Personalised recommendations