Equivalence of SQL Queries in Presence of Embedded Dependencies
Rada Chirkova, Michael Genesereth

TL;DR
This paper develops a comprehensive framework and algorithms for determining the equivalence of SQL queries with embedded dependencies, considering different semantics and aggregate functions, to optimize query reformulations.
Contribution
It introduces equivalence tests and algorithms for CQ queries under bag and bag-set semantics with embedded dependencies, extending to aggregate queries.
Findings
Equivalence tests for CQ queries under bag and bag-set semantics.
Algorithms for query reformulation considering embedded dependencies.
Framework applicable when set-chase terminates.
Abstract
We consider the problem of finding equivalent minimal-size reformulations of SQL queries in presence of embedded dependencies [1]. Our focus is on select-project-join (SPJ) queries with equality comparisons, also known as safe conjunctive (CQ) queries, possibly with grouping and aggregation. For SPJ queries, the semantics of the SQL standard treat query answers as multisets (a.k.a. bags), whereas the stored relations may be treated either as sets, which is called bag-set semantics for query evaluation, or as bags, which is called bag semantics. (Under set semantics, both query answers and stored relations are treated as sets.) In the context of the above Query-Reformulation Problem, we develop a comprehensive framework for equivalence of CQ queries under bag and bag-set semantics in presence of embedded dependencies, and make a number of conceptual and technical contributions.…
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
TopicsAdvanced Database Systems and Queries · Data Management and Algorithms · Semantic Web and Ontologies
