Decidable Containment of Recursive Queries

  • Diego Calvanese
  • Giuseppe De Giacomo
  • Moshe Y. Vardi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2572)

Abstract

One of the most important reasoning tasks on queries is checking containment, i.e., verifying whether one query yields necessarily a subset of the result of another one. Query containment, is crucial in several contexts, such as query optimization, query reformulation, knowledge-base verification, information integration, integrity checking, and cooperative answering. Containment is undecidable in general for Datalog, the fundamental language for expressing recursive queries. On the other hand, it is known that containment between monadic Datalog queries and between Datalog queries and unions of conjunctive queries are decidable. It is also known that containment between unions of conjunctive two-way regular path queries (UC2RPQs), which are queries used in the context of semistructured data models containing a limited form of recursion in the form of transitive closure, is decidable. In this paper we combine the automata-theoretic techniques at the base of these two decidability results to show that containment of Datalog in UC2RPQs is decidable in 2EXPTIME.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Buchheit, M., Jeusfeld, M.A., Nutt, W., Staudt, M.: Subsumption between queries to object-oriented databases. Information Systems 19 (1994) 33–54 Special issue on Extending Database Technology, EDBT’94.CrossRefGoogle Scholar
  2. 2.
    Donini, F.M., Lenzerini, M., Nardi, D., Schaerf, A.: Reasoning in description logics. In Brewka, G., ed.: Principles of Knowledge Representation. Studies in Logic, Language and Information. CSLI Publications (1996) 193–238Google Scholar
  3. 3.
    Gupta, A., Ullman, J.D.: Generalizing conjunctive query containment for view maintenance and integrity constraint verification (abstract). In: Workshop on Deductive Databases (In conjunction with JICSLP), Washington D.C. (USA) (1992) 195Google Scholar
  4. 4.
    Levy, A.Y., Sagiv, Y.: Semantic query optimization in Datalog programs. In: Proc. of the 14th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’95). (1995) 163–173Google Scholar
  5. 5.
    Chaudhuri, S., Krishnamurthy, S., Potarnianos, S., Shim, K.: Optimizing queries with materialized views. In: Proc. of the 11th IEEE Int. Conf. on Data Engineering (ICDE’95), Taipei (Taiwan) (1995)Google Scholar
  6. 6.
    Adali, S., Candan, K.S., Papakonstantinou, Y., Subrahmanian, V.S.: Query caching and optimization in distributed mediator systems. In: Proc. of the ACM SIGMOD Int. Conf. on Management of Data. (1996) 137–148Google Scholar
  7. 7.
    Buneman, P., Davidson, S., Hillebrand, G., Suciu, D.: A query language and optimization technique for unstructured data. In: Proc. of the ACM SIGMOD Int. Conf. on Management of Data. (1996) 505–516Google Scholar
  8. 8.
    Motro, A.: Panorama: A database system that annotates its answers to queries with their properties. J. of Intelligent Information Systems 7 (1996)Google Scholar
  9. 9.
    Levy, A.Y., Rousset, M.C.: Verification of knowledge bases: a unifying logical view. In: Proc. of the 4th European Symposium on the Validation and Verification of Knowledge Based Systems, Leuven, Belgium (1997)Google Scholar
  10. 10.
    Calvanese, D., De Giacomo, G., Lenzerini, M., Nardi, D., Rosati, R.: Description logic framework for information integration. In: Proc. of the 6th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR’98). (1998) 2–13Google Scholar
  11. 11.
    Fernandez, M.F., Florescu, D., Levy, A., Suciu, D.: Verifying integrity constraints on web-sites. In: Proc. of the 16th Int. Joint Conf. on Artificial Intelligence (IJCAI’ 99). (1999) 614–619Google Scholar
  12. 12.
    Friedman, M., Levy, A., Millstein, T.: Navigational plans for data integration. In: Proc. of the 16th Nat. Conf. on Artificial Intelligence (AAAI’99), AAAI Press/The MIT Press (1999) 67–73Google Scholar
  13. 13.
    Milo, T., Suciu, D.: Index structures for path expressions. In: Proc. of the 7th Int. Conf. on Database Theory (ICDT’99). Volume 1540 of Lecture Notes in Computer Science., Springer (1999) 277–295Google Scholar
  14. 14.
    Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational data bases. In: Proc. of the 9th ACM Symp. on Theory of Computing (STOC’77). (1977) 77–90Google Scholar
  15. 15.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison Wesley Publ. Co., Reading, Massachussetts (1995)Google Scholar
  16. 16.
    Chandra, A.K., Harel, D.: Horn clause queries and generalizations. J. of Logic and Computation 2 (1985) 1–15MathSciNetMATHGoogle Scholar
  17. 17.
    Moschovakis, Y.N.: Elementary Induction on Abstract Structures. North-Holland Publ. Co., Amsterdam (1974)Google Scholar
  18. 18.
    Aho, A.V., Sagiv, Y., Ullman, J.D.: Equivalence among relational expressions. SIAM J. on Computing 8 (1979) 218–246MATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Sagiv, Y., Yannakakis, M.: Equivalences among relational expressions with the union and difference operators. J. of the ACM27 (1980) 633–655MATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Klug, A.C.: On conjunctive queries containing inequalities. J. of the ACM 35 (1988) 146–160MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    van der Meyden, R.: The Complexity of Querying Indefinite Information. PhD thesis, Rutgers University (1992)Google Scholar
  22. 22.
    Shmueli, O.: Equivalence of Datalog queries is undecidable. J. of Logic Programming 15 (1993) 231–241MATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Cosmadakis, S.S., Gaifman, H., Kanellakis, P.C., Vardi, M.Y.: Decidable optimization problems for database logic programs. In:Proc. of the 20th ACM SIGACT Symp. on Theory of Computing (STOC’88). (1988) 477–490Google Scholar
  24. 24.
    Sagiv, Y.: Optimizing Datalog programs. In Minker, J., ed.: Foundations of Deductive Databases and Logic Programming. Morgan Kaufmann, Los Altos (1988) 659–698Google Scholar
  25. 25.
    Chaudhuri, S., Vardi, M.Y.: On the equivalence of recursive and nonrecursive datalog programs. J. of Computer and System Sciences 54(1997) 61–78MATHCrossRefMathSciNetGoogle Scholar
  26. 26.
    Chaudhuri, S., Vardi, M.Y.: On the complexity of equivalence between recursive and nonrecursive Datalog programs. In: Proc. of the 13th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’94). (1994) 107–116Google Scholar
  27. 27.
    Bray, T., Paoli, J., Sperberg-McQueen, C.M.: Extensible Markup Language (XML) 1.0 — W3C recommendation. Technical report, World Wide Web Consortium (1998) Available at http://www.w3.org/TR/1998/REC-xml-19980210.
  28. 28.
    Calvanese, D., De Giacomo, G., Lenzerini, M.: Representing and reasoning on XML documents: A description logic approach. J. of Logic and Computation 9 (1999) 295–318MATHCrossRefGoogle Scholar
  29. 29.
    Buneman, P.: Semistructured data. In: Proc. of the 16th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’97). (1997) 117–121Google Scholar
  30. 30.
    Florescu, D., Levy, A., Mendelzon, A.: Database techniques for the World-Wide Web: A survey. SIGMOD Record 27 (1998) 59–74CrossRefGoogle Scholar
  31. 31.
    Abiteboul, S., Buneman, P., Suciu, D.: Data on the Web: from Relations to Semistructured Data and XML. Morgan Kaufmann, Los Altos (2000)Google Scholar
  32. 32.
    Abiteboul, S., Vianu, V.: Regular path queries with constraints. J. of Computer and System Sciences 58 (1999) 428–452MATHCrossRefMathSciNetGoogle Scholar
  33. 33.
    Florescu, D., Levy, A., Suciu, D.: Query containment for conjunctive queries with regular expressions. In: Proc. of the 17th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’98). (1998) 139–148Google Scholar
  34. 34.
    Calvanese, D., De Giacomo, G., Lenzerini, M., Vardi, M.Y.: Containment of conjunctive regular path queries with inverse. In: Proc. of the 7th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR 2000). (2000) 176–185Google Scholar
  35. 35.
    Slutzki, G.: Alternating tree automata. In: Theoretical Computer Science. Volume 41. (1985) 305–318MATHCrossRefMathSciNetGoogle Scholar
  36. 36.
    Maier, D., Ullman, J.D., Vardi, M.Y.: On the foundations of the universal relation model. ACM Trans. on Database Systems 9 (1984) 283–308MATHCrossRefMathSciNetGoogle Scholar
  37. 37.
    Naughton, J.F.: Data independent recursion in deductive databases. J. of Computer and System Sciences 38 (1989) 259–289MATHCrossRefMathSciNetGoogle Scholar
  38. 38.
    Doner, J.E.: Tree acceptors and some of their applications. J. of Computer and System Sciences 4 (1970) 406–451MATHMathSciNetCrossRefGoogle Scholar
  39. 39.
    Thatcher, J.W., Wright, J.B.: Generalized finite automata theory with an application to a decision problem of second order logic. Mathematical Systems Theory 2 (1968) 57–81CrossRefMathSciNetGoogle Scholar
  40. 40.
    Costich, O.L.: A Medvedev characterization of sets recognized by generalized finite automata. Mathematical Systems Theory 6 (1972) 263–267MATHCrossRefMathSciNetGoogle Scholar
  41. 41.
    Deutsch, A., Fernandez, M.F., Florescu, D., Levy, A., Maier, D., Suciu, D.: Querying XML data. Bull. of the IEEE Computer Society Technical Committee on Data Engineering 22 (1999) 10–18Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Diego Calvanese
    • 1
  • Giuseppe De Giacomo
    • 1
  • Moshe Y. Vardi
    • 2
  1. 1.Dipartimento di Informatica e SistemisticaUniversità di Roma “La Sapienza”RomaItaly
  2. 2.Department of Computer ScienceRice UniversityHoustonUSA

Personalised recommendations