skip to main content
10.1145/1559795.1559804acmconferencesArticle/Chapter ViewAbstractPublication PagespodsConference Proceedingsconference-collections
research-article

Size and treewidth bounds for conjunctive queries

Authors Info & Claims
Published:29 June 2009Publication History

ABSTRACT

This paper provides new worst-case bounds for the size and treewith of the result Q(D) of a conjunctive query Q to a database D. We derive bounds for the result size |Q(D)| in terms of structural properties of Q, both in the absence and in the presence of keys and functional dependencies. These bounds are based on a novel "coloring" of the query variables that associates a coloring number C(Q) to each query Q. Using this coloring number, we derive tight bounds for the size of Q(D) in case (i) no functional dependencies or keys are specified, and (ii) simple (one-attribute) keys are given. These results generalize recent size-bounds for join queries obtained by Atserias, Grohe, and Marx (FOCS 2008). An extension of our coloring technique also gives a lower bound for |Q(D)| in the general setting of a query with arbitrary functional dependencies. Our new coloring scheme also allows us to precisely characterize (both in the absence of keys and with simple keys) the treewidth-preserving queries--the queries for which the output treewidth is bounded by a function of the input treewidth. Finally we characterize the queries that preserve the sparsity of the input in the general setting with arbitrary functional dependencies.

References

  1. S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A.V. Aho, C. Beeri, and J.D. Ullman. The theory of joins in relational databases. ACM Trans. Database Syst., 4(3):297--314, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A.V. Aho, Y. Sagiv, and J.D. Ullman. Equivalence of relational expressions. SIAM J. of Computing, 8(2):218--246, May 1979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Arnborg, J. Lagergren, and D. Seese. Easy problems for tree-decomposable graphs. J. Algorithms, 12(2):308--340, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Atserias, M. Grohe, and D. Marx. Size bounds and query plans for relational joins. In IEEE FOCS'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Beeri and M.Y. Vardi. A proof procedure for data dependencies. J. ACM, 31(4):718--741, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A.K. Chandra and P.M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In ACM STOC, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Chaudhuri. An overview of query optimization in relational systems. In PODS 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Courcelle. The monadic second-order logic of graphs. i. recognizable sets of finite graphs. Inf. Comput., 85(1):12--75, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Deutsch, L. Popa, and V. Tannen. Query reformulation with constraints. SIGMOD Rec., 35(1):65--73, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Fagin, P.G. Kolaitis, R.J. Miller, and L. Popa. Data exchange: Semantics and query answering. In ICDT, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Gottlob and S.T. Lee. A logical approach to multicut problems. Inf. Proc. Letters, 103(4):136--141, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Gottlob, S.T. Lee, and G.J. Valiant. Size and treewidth bounds for conjunctive queries (extended version). Available from the authors upon request.Google ScholarGoogle Scholar
  14. G. Gottlob, R. Pichler, and F. Wei. Efficient datalog abduction through bounded treewidth. In AAAI, pages 1626--1631, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Grohe and D. Marx. Constraint solving via fractional edge covers. In SODA 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P.J. Haas, J.F. Naughton, S. Seshadri, and A.N. Swami. Selectivity and cost estimation for joins based on random sampling. J. Comput. Syst. Sci., 52(3):550--569, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Jarke and J. Koch. Query optimization in database systems. ACM Comput. Surv., 16(2):111--152, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. Kolaitis. Schema mappings, data exchange, and metadata management. In PODS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Lenzerini. Data integration: a theoretical perspective. In PODS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A.Y. Levy, A.O. Mendelzon, and Y. Sagiv. Answering queries using views. In PODS 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Maier, A.O. Mendelzon, and Y. Sagiv. Testing implications of data dependencies. ACM Trans. Database Syst., 4(4):455--469, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Olken and D. Rotem. Random sampling from database files: A survey. In Proc. of Stat. and Scientific Database Management, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. Robertson and P.D. Seymour. Graph minors II: Algorithmic Aspects of Tree-Width. Journal of Algorithms, 7:309--322, 1986.Google ScholarGoogle ScholarCross RefCross Ref
  24. A.N. Swami and K.B. Schiefer. On the estimation of join result sizes. In Advances in Database Technology -- EDBT'94. 4th Int. Conf. on Extending Database Technology, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Thorup. Structured programs have small tree-width and good register allocation. Information and Computation, 142:318--332, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Size and treewidth bounds for conjunctive queries

            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 '09: Proceedings of the twenty-eighth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
              June 2009
              298 pages
              ISBN:9781605585536
              DOI:10.1145/1559795
              • General Chair:
              • Jan Paredaens,
              • Program Chair:
              • Jianwen Su

              Copyright © 2009 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 29 June 2009

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              PODS '09 Paper Acceptance Rate26of97submissions,27%Overall Acceptance Rate642of2,707submissions,24%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader