Affiliation:
1. Technion---Israel Institute of Technology, Haifa, Israel
2. Free University of Bozen-Bolzano, Bozen, Italy
3. Hebrew University, Jerusalem, Israel
Abstract
Equivalence of aggregate queries is investigated for the class of conjunctive queries with comparisons and the aggregate operators count, count-distinct, min, max, and sum. Essentially, this class contains unnested SQL queries with the above aggregate operators, with a where clause consisting of a conjunction of comparisons, and without a having clause. The comparisons are either interpreted over a domain with a dense order (like the rationals) or with a discrete order (like the integers). Characterizations of equivalence differ for the two cases. For queries with either max or min, equivalence is characterized in terms of dominance mappings, which can be viewed as a generalization of containment mappings. For queries with the count-distinct operator, a sufficient condition for equivalence is given in terms of equivalence of conjunctive queries under set semantics. For some special cases, it is shown that this condition is also necessary. For conjunctive queries with comparisons but without aggregation, equivalence under bag-set semantics is characterized in terms of isomorphism. This characterization essentially remains the same also for queries with the count operator. Moreover, this characterization also applies to queries with the sum operator if the queries have either constants or comparisons, but not both. In the general case (i.e., both comparisons and constants), the characterization of the equivalence of queries with the sum operator is more elaborate. All the characterizations given in the paper are decidable in polynomial space.
Publisher
Association for Computing Machinery (ACM)
Subject
Artificial Intelligence,Hardware and Architecture,Information Systems,Control and Systems Engineering,Software
Cited by
63 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Atlas: Automating Cross-Language Fuzzing on Android Closed-Source Libraries;Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis;2024-09-11
2. An Analysis of the Math Requirements of 199 CS BS/BA Degrees at 158 U.S. Universities;Communications of the ACM;2024-08
3. The BPC Relevance of Common Assessment in the Introductory Sequence;Communications of the ACM;2024-07
4. Review of Neuromorphic Processing for Vision Sensors;Proceedings of the Great Lakes Symposium on VLSI 2024;2024-06-12
5. Early Career Software Developers - Are You Sinking or Swimming?;Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Society;2024-04-14