pith. machine review for the scientific record. sign in

arxiv: 1802.02229 · v3 · submitted 2018-02-06 · 💻 cs.DB · cs.PL

Recognition: unknown

Axiomatic Foundations and Algorithms for Deciding Semantic Equivalences of SQL Queries

Authors on Pith no claims yet
classification 💻 cs.DB cs.PL
keywords queriesequivalencesu-semiringdatadecidingformalismmanagementproblem
0
0 comments X
read the original 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 Coq 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 39 query rewrite rules from both classical data management research papers and real-world SQL engines, where many of them have never been proven correct before.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. SpotIt+: Verification-based Text-to-SQL Evaluation with Database Constraints

    cs.DB 2026-03 unverdicted novelty 7.0

    SpotIt+ uses verification to find realistic counterexample databases that expose discrepancies between generated and gold SQL queries missed by standard test-based evaluation on the BIRD dataset.