Equivalences Among Aggregate Queries with Negation
Sara Cohen, Werner Nutt, Yehoshua Sagiv

TL;DR
This paper characterizes when disjunctive aggregate queries with negation are equivalent, providing decidability results for various aggregation functions and identifying polynomial-time cases for certain query classes.
Contribution
It offers a full characterization of query equivalence with negation for key aggregation functions and establishes decidability and complexity results, including polynomial-time decidability for quasilinear queries.
Findings
Decidability of equivalence for count, max, sum, prod, toptwo, parity, count distinct, and average.
Polynomial-time equivalence decision for quasilinear queries with several aggregation functions.
Equivalence under bag-set semantics is decidable for non-aggregate queries with negation.
Abstract
Query equivalence is investigated for disjunctive aggregate queries with negated subgoals, constants and comparisons. A full characterization of equivalence is given for the aggregation functions count, max, sum, prod, toptwo and parity. A related problem is that of determining, for a given natural number N, whether two given queries are equivalent over all databases with at most N constants. We call this problem bounded equivalence. A complete characterization of decidability of bounded equivalence is given. In particular, it is shown that this problem is decidable for all the above aggregation functions as well as for count distinct and average. For quasilinear queries (i.e., queries where predicates that occur positively are not repeated) it is shown that equivalence can be decided in polynomial time for the aggregation functions count, max, sum, parity, prod, toptwo and average. A…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsData Management and Algorithms · Advanced Database Systems and Queries · Logic, Reasoning, and Knowledge
