skip to main content
10.1145/1265530.1265534acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
Article

Queries determined by views: pack your views

Published:11 June 2007Publication History

ABSTRACT

A query Q is determined by a set of views V if, whenever V (I1) = V (I2) for two database instances I1, I2 then also Q(I1) = Q(I2). Does this imply that Q can be rewritten as a query Q0 that only uses the views V?.

For first-order (FO) queries and view definitions over possibly infinite databases, the answer is yes, as follows from old results of Beth and Craig. We say that FO is complete for FO-to-FO rewritings. However, Nash, Segoufin and Vianu (2007) prove that if the query and the view definitions are given by conjunctive queries, then it might not be possible to formulate Q' as a conjunctive query. In other words, CQ is not complete for CQ-to-CQ rewritings.

Here we consider queries and view definitions in the packed fragment (PF) of first-order logic. This is a generalization of the guarded fragment, a fragment of particular interest to database theory. Gottlob et.al. 2002 show that the guarded conjunctive queries are exactly the acyclic queries. Leinders et.al. 2005 characterize the entire guarded fragment by the semijoin algebra.

We show that for both finite and unrestricted databases, PF is complete for PF-to-PF rewritings. The same holds for packed (unions of) conjunctive queries. In both cases, we provide algorithms for testing whether a query is determined by a set of views, and for actually rewriting Q to Q'. To compare: these problems are undecidable for full FO, and still open for conjunctive queries.

Skip Supplemental Material Section

Supplemental Material

High Resolution
Low Resolution

References

  1. H. Andréka, J. van Benthem, and I. Németi. Modal languages and bounded fragments of predicate logic. Journal of Philosophical Logic, 27(3):217--274, 1998.Google ScholarGoogle Scholar
  2. F. Baader and W. Nutt. Basic description logics. In The description logic handbook: theory, implementation, and applications, pages 43--95. Cambridge University Press, New York, NY, USA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Beth. On Padoa's method in the theory of definition. Indagationes Mathematicae, 15:330--339, 1953.Google ScholarGoogle ScholarCross RefCross Ref
  4. E. Beth. Formal methods, An introduction to symbolic logic and to the study of effective operations in arithmetic and logic. Number 4 in Synthese Library. Reidel, Dordrecht, 1962.Google ScholarGoogle Scholar
  5. D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Vardi. Lossless regular views. In Proceedings PODS, pages 247--258, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Chang and H. Keisler. Model Theory. North-Holland, 1973.Google ScholarGoogle Scholar
  7. W. Craig. Three uses of the Herbrand-Gentzen theorem in relation to model theory and proof theory. Journal of Symbolic Logic, 22:269--285, 1957.Google ScholarGoogle ScholarCross RefCross Ref
  8. K. Doets. Basic Model Theory. CSLI Publications, Stanford, 1996.Google ScholarGoogle Scholar
  9. M. Fitting. First Order Logic and Automated Theorem Proving (second edition). Springer Verlag, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Flum, M. Frick, and M. Grohe. Query evaluation via tree-decompositions. In Proceedings ICDT, pages 22--38, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Friedman. The complexity of explicit definitions. Advances in Mathematics, 20(1):18--29, 1976.Google ScholarGoogle ScholarCross RefCross Ref
  12. G. Gottlob, N. Leone, and F. Scarcello. Robbers, marshals, and guards: game theoretic and logical characterizations of hypertree width. J. Comput. Syst. Sci., 66(4):775--808, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. E. Grädel. On the restraining power of guards. Journal of Symbolic Logic, 64(4):1719--1742, 1999.Google ScholarGoogle ScholarCross RefCross Ref
  14. E. Grädel. Guarded fixed point logics and the monadic theory of countable trees. Theor. Comput. Sci., 288(1):129--152, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Grumbach and L. Tininini. On the content of materialized aggregate views. In Proceedings PODS, pages 47--57, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. I. Hodkinson. Loosely guarded fragment of first-order logic has the finite model property. Studia Logica, 70(2):205--240, 2002.Google ScholarGoogle Scholar
  17. E. Hoogland. Algebraic characterizations of various beth definability properties. Studia Logica, 65(1):91--112, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  18. E. Hoogland and M. Marx. Interpolation in the guarded fragment. Studia Logica, 70(3):273--409, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  19. E. Hoogland, M. Marx, and M. Otto. Beth definability for the guarded fragment. In H. Ganzinger, D. McAllester, and A. Voronkov, editors, Logic for Programming and Automated Reasoning, 6th International Conference LPAR99, Tbilisi, Georgia, volume 1705 of LNAI, pages 273--285. Springer, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. Leinders, M. Marx, J. Tysziewicz, and J. van den Bussche. The semijoin algebra and the guarded fragment. Journal of Logic, Language and Information, 14:331--343, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Marx and Y. Venema. Local variations on a loose theme: modal logic and decidability. In E. Grädel, P. Kolaitis, L. Libkin, M. Marx, J. Spencer, M. Vardi, Y. Venema, and S. Weinstein, editors, Finite Model Theory and its Applications. Springer-Verlag, 2007.Google ScholarGoogle Scholar
  22. A. Nash, L. Segoufin, and V. Vianu. Determinacy and rewriting of conjunctive queries using views: a progress report. In Proceedings ICDT 2007, to appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. D. Pigozzi. Amalgamation, congruence extension and interpolation properties in algebras. Algebra Universalis, 1:269--349, 1972.Google ScholarGoogle ScholarCross RefCross Ref
  24. L. Segoufin and V. Vianu. Views and queries: determinacy and rewriting. In Proceedings PODS, pages 49--60, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Tarski. Einige methodologische Untersuchungen über die Definierbarkeit der Begriffe. Erkenntnis, 5:80--100, 1935.Google ScholarGoogle ScholarCross RefCross Ref
  26. A. Tarski. Logic, semantics and metamathematics. Clarendon, Oxford, 1956.Google ScholarGoogle Scholar
  27. B. ten Cate. Interpolation for extended modal languages. Journal of Symbolic Logic, 70(1):223--234, 2005.Google ScholarGoogle ScholarCross RefCross Ref
  28. B. ten Cate, W. Conradi, M. Marx, and Y. Venema. Definitorially complete description logics. In Proceedings KR 2006, pages 79--89, 2006.Google ScholarGoogle Scholar
  29. J. Van den Bussche. Applications of Alfred Tarski's ideas in database theory. Lecture Notes in Computer Science, 2142:20--37, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. van Ulsen. E. W. Beth als logicus. PhD thesis, University of Amsterdam, 2000.Google ScholarGoogle Scholar
  31. A. Visser. Uniform interpolation and layered bisimulation. In Gädel '96 (Brno, 1996), volume 6 of Lecture Notes Logic, pages 139--164. Springer, Berlin, 1996.Google ScholarGoogle Scholar

Index Terms

  1. Queries determined by views: pack your views

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        PODS '07: Proceedings of the twenty-sixth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
        June 2007
        328 pages
        ISBN:9781595936851
        DOI:10.1145/1265530

        Copyright © 2007 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 11 June 2007

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate476of1,835submissions,26%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!