skip to main content
10.1145/2213556.2213591acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Efficient approximations of conjunctive queries

Published:21 May 2012Publication History

ABSTRACT

When finding exact answers to a query over a large database is infeasible, it is natural to approximate the query by a more efficient one that comes from a class with good bounds on the complexity of query evaluation. In this paper we study such approximations for conjunctive queries. These queries are of special importance in databases, and we have a very good understanding of the classes that admit fast query evaluation, such as acyclic, or bounded (hyper)treewidth queries.

We define approximations of a given query Q as queries from one of those classes that disagree with Q as little as possible. We mostly concentrate on approximations that are guaranteed to return correct answers. We prove that for the above classes of tractable conjunctive queries, approximations always exist, and are at most polynomial in the size of the original query. This follows from general results we establish that relate closure properties of classes of conjunctive queries to the existence of approximations. We also show that in many cases, the size of approximations is bounded by the size of the query they approximate. We establish a number of results showing how combinatorial properties of queries affect properties of their approximations, study bounds on the number of approximations, as well as the complexity of finding and identifying approximations. We also look at approximations that return all correct answers and study their properties.

References

  1. S. Abiteboul, K. Compton, and V. Vianu. Queries are easier than you thought (probably). In ACM Symp. on Principles of Database Systems, 1992,ACM Press, pages 23--32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Abiteboul, O. Duschka. Complexity of answering queriesusing materialized views. In PODS 1998, pages 254--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Aigner. Combinatorial Theory. Springer, 1997.Google ScholarGoogle Scholar
  5. H. Bodlaender. A linear-time algorithm for finding tree-decompositions ofsmall treewidth. SIAM Journal on Computing, 25 (1996), 1305--1317. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. B. ten Cate, Ph. Kolaitis, W.-C. Tan. Database constraints and homomorphism dualities. In CP 2010, pages 475--490. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Chandra and P. Merlin. Optimal implementation of conjunctive queries in relationaldata bases. In ACM Symp. on Theory of Computing, 1977, pages77--90. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Chekuri, A. Rajaraman. Conjunctive query containment revisited. Theor. Comput. Sci. 239(2): 211--229 (2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Fagin, Ph. Kolaitis, L. Popa. Data exchange: getting to the core. ACM TODS 30 (2005), 90--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. W. Fan, J. Li, S. Ma, N. Tang, Y. Wu. Graph pattern matching: from intractable to polynomialtime. PVLDB 3(1): 264--275 (2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Fink, D. Olteanu. On the optimal approximation of queries using tractablepropositional languages. In ICDT 2011, pages 174--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Flum, M. Frick, and M. Grohe. Query evaluation via tree-decompositions. Journal of the ACM, 49 (2002), 716--752. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Flum and M. Grohe. Parameterized Complexity Theory. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Garofalakis and P. Gibbons. Approximate query processing: taming the terabytes. In VLDB'01. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Gottlob, N. Leone, and F. Scarcello. The complexity of acyclic conjunctive queries. Journal of the ACM, 48 (2001), 431--498. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Gottlob, N. Leone, and F. Scarcello. Hypertree decompositions and tractable queries. JCSS, 64 (2002), 579--627.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G. Gottlob, N. Leone, and F. Scarcello. Robbers, marshals, and guards: game theoretic and logical characterizations of hypertree width. JCSS, 66 (2003), 775--808. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. Gottlob, Z. Miklos, and T. Schwentick. Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM, 56(6): (2009). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Grohe, T. Schwentick, and L. Segoufin. When is the evaluation of conjunctive queries tractable? In ACM Symp. on Theory of Computing, 2001, pages 657--666. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Halevy. Answering queries using views: A survey. VLDB J. 10(4):270--294 (2001). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Hell and J. Nešetřil. Graphs and Homomorphisms. Oxford University Press, 2004.Google ScholarGoogle Scholar
  22. L. Hella, Ph. Kolaitis, and K. Luosto. Almost everywhere equivalence of logics in finite model theory. Bull. of Symbolic Logic, 2 (1996), 422--443.Google ScholarGoogle ScholarCross RefCross Ref
  23. Y. Ioannidis. Approximations in database systems. In ICDT'03, pages 16--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ph. Kolaitis and M. Vardi. Conjunctive-query containment and constraint satisfaction. JCSS 61(2):302--332 (2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ph. Kolaitis and M. Vardi. A logical approach to constraint satisfaction. In Finite Model Theory and Its Applications, Springer2007, pages 339--370.Google ScholarGoogle ScholarCross RefCross Ref
  26. M. Lenzerini. Data integration: a theoretical perspective. In Proc. 21st ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, pages 233--246, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. Libkin. Incomplete information and certain answers in general datamodels. In PODS 2011, pages 59--70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Q. Liu. Approximate query processing. Encyclopedia of Database Systems, 2009, pages 113--119.Google ScholarGoogle Scholar
  29. . Malik and L. Zhang. Booleansatisfiability: from theoretical hardness to practical success. CACM 52(8), 76--82, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Nešetřil, C. Tardif. Duality theorems for finite structures (Characterising gapsand good characterisations). J. Combin. Theory, Ser. B 80(1):80--97 (2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. H. Papadimitriou and M. Yannakakis. The complexity of facets (and some facets of complexity). Journal of Computer and System Sciences, 28 (1986), 244--259.Google ScholarGoogle ScholarCross RefCross Ref
  32. A. Robinson, A. Voronkov, eds. Handbook of Automated Reasoning. The MIT Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Vardi. On the complexity of bounded-variable queries. In PODS'95, pages 266--276. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Yannakakis. Algorithms for acyclic database schemes. In Proc. Conf. on Very Large Databases, 1981, pages 82--94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. West. Introduction to Graph Theory. Prentice Hall, 2001.Google ScholarGoogle Scholar

Index Terms

  1. Efficient approximations of 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

        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!