Axiomatic foundations and algorithms for deciding semantic equivalences of SQL queries
Open accessThe DOI matches its Crossref record; 2 of the 2 references it cites were found in a registry or an index.
Abstract
Deciding the equivalence of SQL queries is a fundamental problem in data management. As prior work has mainly focused on studying the theoretical limitations of the problem, very few implementations for checking such equivalences exist. In this paper, we present a new formalism and implementation for reasoning about the equivalences of SQL queries. Our formalism, U-semiring, extends SQL's semiring semantics with unbounded summation and duplicate elimination. U-semiring is defined using only very few axioms and can thus be easily implemented using proof assistants such as Lean for automated query reasoning. Yet, they are sufficient enough to enable us reason about sophisticated SQL queries that are evaluated over bags and sets, along with various integrity constraints. To evaluate the effectiveness of U-semiring, we have used it to formally verify 68 equivalent queries and rewrite rules from both classical data management research papers and real-world SQL engines, where many of them have never been proven correct before.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Data exchange: semantics and query answering
Fagin, R., Kolaitis, P. G., Miller, R. J., & Popa, L. (2005) · Theoretical Computer Science · doi:10.1016/j.tcs.2004.10.033 · Cited by 1,206
Green, T. J., Karvounarakis, G., & Tannen, V. (2007) · Proceedings of the twenty-sixth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems · doi:10.1145/1265530.1265535 · Cited by 812
Cited by
The Lean 4 Theorem Prover and Programming Language
Moura, L. D., & Ullrich, S. (2021) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-79876-5_37 · Cited by 258
Semantic Evaluation for Text-to-SQL with Distilled Test Suites
Zhong, R., Yu, T., & Klein, D. (2020) · Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.29 · Cited by 112
Automated Validating and Fixing of Text-to-SQL Translation with Execution Consistency
Yang, Y., Wang, Z., Xia, Y., Wei, Z., Ding, H., Piskac, R., Chen, H., & Li, J. (2025) · Proceedings of the ACM on Management of Data · doi:10.1145/3725271 · Cited by 8
Metadata
- Authors
- Chu, S., Murphy, B., Roesch, J., Cheung, A., & Suciu, D.
- Venue
- Proceedings of the VLDB Endowment
- Published
- 2018-07
- Volume
- 11
- Issue
- 11
- Pages
- 1482-1495
- ISSN
- 2150-8097 (ISSN-L)
- OpenAlex
- W2964142859
- Cited by
- 61
- References
- 2
- FWCI
- 2.65
- Type
- journal article
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Axiomatic foundations and algorithms for deciding semantic equivalences of SQL queries. https://app.cochat.ai/papers/10.14778/3236187.3236200
- The paper
- Chu, S., Murphy, B., Roesch, J., Cheung, A., & Suciu, D. (2018). Axiomatic foundations and algorithms for deciding semantic equivalences of SQL queries. Proceedings of the VLDB Endowment. https://doi.org/10.14778/3236187.3236200
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.