Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Efficient Approximations of Conjunctive Queries

Published: 01 January 2014 Publication 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 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. The technical toolkit of the paper comes from the theory of graph homomorphisms, as we mainly work with tableaux of queries and characterize approximations via preorders based on the existence of homomorphisms. In particular, most of our results can also be interpreted as approximation or complexity results for directed graphs.

References

[1]
S. Abiteboul, K. Compton, and V. Vianu, Queries are easier than you thought (probably), in Proceedings of the 11th ACM Symposium on Principles of Database Systems, PODS'92, 1992, pp. 23--32.
[2]
S. Abiteboul and O. Duschka, Complexity of answering queries using materialized views, in Proceedings of the 17th ACM Symposium on Principles of Database Systems, PODS'98, 1998, pp. 254--263.
[3]
S. Abiteboul, R. Hull, and V. Vianu, Foundations of Databases, Addison-Wesley, 1995.
[4]
M. Aigner, Combinatorial Theory, Springer, 1997.
[5]
V. Bárány, G. Gottlob, and M. Otto, Querying the guarded fragment, in Proceedings of IEEE Logic in Computer Science, LICS'10, 2010, pp. 1--10.
[6]
P. Barceló, L. Libkin, and M. Romero, Efficient approximations of conjunctive queries, in Proceedings of the 31st ACM Symposium on Principles of Database Systems, PODS'12, 2012, pp. 249--260.
[7]
P. Barceló, L. Libkin, and M. Romero, On low treewidth approximations of conjunctive queries, in Proceedings of 6th Alberto Mendelzon International Workshop on Foundations of Data Management, AMW'12, CEUR Workshop Proceedings 866, 2012, pp. 91--101.
[8]
H. L. Bodlaender, A linear-time algorithm for finding tree-decompositions of small treewidth, SIAM J. Comput., 25 (1996), pp. 1305--1317.
[9]
B. ten Cate, Ph. Kolaitis, and W.-C. Tan, Database constraints and homomorphism dualities, in Proceedings of the 16th International Conference on Principles and Practice of Constraint Programming, CP'10, 2010, pp. 475--490.
[10]
A. Chandra and P. Merlin, Optimal implementation of conjunctive queries in relational data bases, in Proceedings of the 9th ACM Symposium on Theory of Computing, STOC'77, 1977, pp. 77--90.
[11]
C. Chekuri and A. Rajaraman, Conjunctive query containment revisited, Theoret. Comput. Sci., 239 (2000), pp. 211--229.
[12]
V. Dalmau, P. G. Kolaitis, and M. Y. Vardi, Constraint satisfaction, bounded treewidth, and finite-variable logics, in Proceedings of the 8th International Conference on Principles and Practice of Constraint Programming, CP 2002, pp. 310--326.
[13]
R. Fagin, Ph. Kolaitis, and L. Popa, Data exchange: Getting to the core, ACM Trans. Database Syst., 30 (2005), pp. 90--101.
[14]
W. Fan, J. Li, S. Ma, N. Tang, and Y. Wu, Graph pattern matching: From intractable to polynomial time, Proc. VLDB, 3 (2010), pp. 264--275.
[15]
R. Fink and D. Olteanu, On the optimal approximation of queries using tractable propositional languages, in Proceedings of the 14th International Conference on Database Theory, ICDT'11, 2011, pp. 174--185.
[16]
J. Flum, M. Frick, and M. Grohe, Query evaluation via tree-decompositions, J. ACM, 49 (2002), pp. 716--752.
[17]
J. Flum and M. Grohe, Parameterized Complexity Theory, Springer, 2006.
[18]
M. Garofalakis and P. Gibbons, Approximate query processing: Taming the terabytes, in Proceedings of the 27th International Conference on Very Large Data Bases, VLDB'01.
[19]
G. Gottlob, N. Leone, and F. Scarcello, The complexity of acyclic conjunctive queries, J. ACM, 48 (2001), pp. 431--498.
[20]
G. Gottlob, N. Leone, and F. Scarcello, Hypertree decompositions and tractable queries, J. Comput. System Sci., 64 (2002), pp. 579--627.
[21]
G. Gottlob, N. Leone, and F. Scarcello, Robbers, marshals, and guards: Game theoretic and logical characterizations of hypertree width, J. Comput. System Sci., 66 (2003), pp. 775--808.
[22]
G. Gottlob, Z. Miklos, and T. Schwentick, Generalized hypertree decompositions: NP-hardness and tractable variants, J. ACM, 56 (2009).
[23]
M. Grohe, T. Schwentick, and L. Segoufin, When is the evaluation of conjunctive queries tractable?, in Proceedings on 33rd ACM Symposium on Theory of Computing, STOC'01, 2001, pp. 657--666.
[24]
A. Halevy, Answering queries using views: A survey, VLDB J., 10 (2001), pp. 270--294.
[25]
P. Hell and J. Nešetřil, Graphs and Homomorphisms, Oxford University Press, 2004.
[26]
P. Hell, J. Nešetřil, and X. Zhu, Complexity of tree homomorphisms, Discrete Appl. Math., 70 (1996), pp. 23--36.
[27]
L. Hella, Ph. Kolaitis, and K. Luosto, Almost everywhere equivalence of logics in finite model theory, Bull. Symbolic Logic, 2 (1996), pp. 422--443.
[28]
Y. Ioannidis, Approximations in database systems, in Proceedings of the 9th International Conference on Database Theory, ICDT'03, 2003, pp. 16--30.
[29]
Ph. Kolaitis and M. Vardi, Conjunctive-query containment and constraint satisfaction, J. Comput. System Sci., 61 (2000), pp. 302--332.
[30]
Ph. Kolaitis and M. Vardi, A logical approach to constraint satisfaction, in Finite Model Theory and Its Applications, Springer, 2007, pp. 339--370.
[31]
M. Lenzerini, Data integration: A theoretical perspective, in Proceedings of the 21st Symposium on Principles of Database Systems, PODS'02, 2002, pp. 233--246.
[32]
L. Libkin, Incomplete information and certain answers in general data models, in Proceedings of the 30th Symposium on Principles of Database Systems, PODS'11, 2011, pp. 59--70.
[33]
Q. Liu, Approximate query processing, in Encyclopedia of Database Systems, 2009, pp. 113--119.
[34]
S. Malik and L. Zhang, Boolean satisfiability: From theoretical hardness to practical success, Comm. ACM, 52 (2009), pp. 76--82.
[35]
J. Nešetřil and C. Tardif, Duality theorems for finite structures (characterising gaps and good characterisations), J. Combin. Theory Ser. B, 80 (2000), pp. 80--97.
[36]
C. H. Papadimitriou and M. Yannakakis, The complexity of facets (and some facets of complexity), J. Comput. System Sci., 28 (1996), pp. 244--259.
[37]
A. Robinson and A. Voronkov, eds., Handbook of Automated Reasoning, The MIT Press, 2001.
[38]
J. Rothe, Exact complexity of exact-four-colorability, Inform. Process. Lett., 87 (2003), pp. 7--12.
[39]
M. Vardi, On the complexity of bounded-variable queries, in Proceedings of the 14th ACM Symposium on Principles of Database Systems, PODS'95, 1995, pp. 266--276.
[40]
D. West, Introduction to Graph Theory, Prentice-Hall, 2001.
[41]
M. Yannakakis, Algorithms for acyclic database schemes, in Proceedings of 7th International Conference on Very Large Databases, VLDB'81, 1981, pp. 82--94.

Cited By

View all
  • (2020)Processing Big Data Across InfrastructuresBig Data – BigData 202010.1007/978-3-030-59612-5_4(38-51)Online publication date: 18-Sep-2020
  • (2016)Semantic Acyclicity Under ConstraintsProceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2902251.2902302(343-354)Online publication date: 15-Jun-2016
  • (2015)Querying Big Data by Accessing Small DataProceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2745754.2745771(173-184)Online publication date: 20-May-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image SIAM Journal on Computing
SIAM Journal on Computing  Volume 43, Issue 3
2014
265 pages
ISSN:0097-5397
DOI:10.1137/smjcat.43.3
Issue’s Table of Contents

Publisher

Society for Industrial and Applied Mathematics

United States

Publication History

Published: 01 January 2014

Author Tags

  1. conjunctive queries
  2. approximation
  3. graphs
  4. homomorphisms
  5. hypergraphs

Author Tags

  1. 68P15
  2. 05C60
  3. 05C65
  4. 68Q17

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2020)Processing Big Data Across InfrastructuresBig Data – BigData 202010.1007/978-3-030-59612-5_4(38-51)Online publication date: 18-Sep-2020
  • (2016)Semantic Acyclicity Under ConstraintsProceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2902251.2902302(343-354)Online publication date: 15-Jun-2016
  • (2015)Querying Big Data by Accessing Small DataProceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2745754.2745771(173-184)Online publication date: 20-May-2015
  • (2015)Efficient Evaluation and Approximation of Well-designed Pattern TreesProceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2745754.2745767(131-144)Online publication date: 20-May-2015

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media