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.
- 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 Scholar
Digital Library
- S. Abiteboul, O. Duschka. Complexity of answering queriesusing materialized views. In PODS 1998, pages 254--263. Google Scholar
Digital Library
- S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. Google Scholar
Digital Library
- M. Aigner. Combinatorial Theory. Springer, 1997.Google Scholar
- H. Bodlaender. A linear-time algorithm for finding tree-decompositions ofsmall treewidth. SIAM Journal on Computing, 25 (1996), 1305--1317. Google Scholar
Digital Library
- B. ten Cate, Ph. Kolaitis, W.-C. Tan. Database constraints and homomorphism dualities. In CP 2010, pages 475--490. Google Scholar
Digital Library
- A. Chandra and P. Merlin. Optimal implementation of conjunctive queries in relationaldata bases. In ACM Symp. on Theory of Computing, 1977, pages77--90. Google Scholar
Digital Library
- C. Chekuri, A. Rajaraman. Conjunctive query containment revisited. Theor. Comput. Sci. 239(2): 211--229 (2000). Google Scholar
Digital Library
- R. Fagin, Ph. Kolaitis, L. Popa. Data exchange: getting to the core. ACM TODS 30 (2005), 90--101. Google Scholar
Digital Library
- W. Fan, J. Li, S. Ma, N. Tang, Y. Wu. Graph pattern matching: from intractable to polynomialtime. PVLDB 3(1): 264--275 (2010). Google Scholar
Digital Library
- R. Fink, D. Olteanu. On the optimal approximation of queries using tractablepropositional languages. In ICDT 2011, pages 174--185. Google Scholar
Digital Library
- J. Flum, M. Frick, and M. Grohe. Query evaluation via tree-decompositions. Journal of the ACM, 49 (2002), 716--752. Google Scholar
Digital Library
- J. Flum and M. Grohe. Parameterized Complexity Theory. Springer, 2006. Google Scholar
Digital Library
- M. Garofalakis and P. Gibbons. Approximate query processing: taming the terabytes. In VLDB'01. Google Scholar
Digital Library
- G. Gottlob, N. Leone, and F. Scarcello. The complexity of acyclic conjunctive queries. Journal of the ACM, 48 (2001), 431--498. Google Scholar
Digital Library
- G. Gottlob, N. Leone, and F. Scarcello. Hypertree decompositions and tractable queries. JCSS, 64 (2002), 579--627.Google Scholar
Digital Library
- 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 Scholar
Digital Library
- G. Gottlob, Z. Miklos, and T. Schwentick. Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM, 56(6): (2009). Google Scholar
Digital Library
- 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 Scholar
Digital Library
- A. Halevy. Answering queries using views: A survey. VLDB J. 10(4):270--294 (2001). Google Scholar
Digital Library
- P. Hell and J. Nešetřil. Graphs and Homomorphisms. Oxford University Press, 2004.Google Scholar
- 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 Scholar
Cross Ref
- Y. Ioannidis. Approximations in database systems. In ICDT'03, pages 16--30. Google Scholar
Digital Library
- Ph. Kolaitis and M. Vardi. Conjunctive-query containment and constraint satisfaction. JCSS 61(2):302--332 (2000). Google Scholar
Digital Library
- Ph. Kolaitis and M. Vardi. A logical approach to constraint satisfaction. In Finite Model Theory and Its Applications, Springer2007, pages 339--370.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- L. Libkin. Incomplete information and certain answers in general datamodels. In PODS 2011, pages 59--70. Google Scholar
Digital Library
- Q. Liu. Approximate query processing. Encyclopedia of Database Systems, 2009, pages 113--119.Google Scholar
- . Malik and L. Zhang. Booleansatisfiability: from theoretical hardness to practical success. CACM 52(8), 76--82, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- A. Robinson, A. Voronkov, eds. Handbook of Automated Reasoning. The MIT Press, 2001. Google Scholar
Digital Library
- M. Vardi. On the complexity of bounded-variable queries. In PODS'95, pages 266--276. Google Scholar
Digital Library
- M. Yannakakis. Algorithms for acyclic database schemes. In Proc. Conf. on Very Large Databases, 1981, pages 82--94. Google Scholar
Digital Library
- D. West. Introduction to Graph Theory. Prentice Hall, 2001.Google Scholar
Index Terms
Efficient approximations of conjunctive queries
Recommendations
Efficient Approximations of Conjunctive Queries
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 ...
Hypertree Decompositions: Questions and Answers
PODS '16: Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database SystemsIn the database context, the hypertree decomposition method is used for query optimization, whereby conjunctive queries having a low degree of cyclicity can be recognized and decomposed automatically, and efficiently evaluated. Hypertree decompositions ...
Answering Conjunctive Queries with Inequalities
In this paper, we study the complexity of answering conjunctive queries (CQ) with inequalities (ź). In particular, we are interested in comparing the complexity of the query with and without inequalities. The main contribution of our work is a novel ...






Comments