A provenance semantics can explain a query—and still fail to express SQL
A new impossibility result isolates bag difference as the boundary: canonical and compatible interpretation semantics cannot recover SQL’s monus operation.
The result
A new database-theory paper proves a sharp limitation for two ways of assigning provenance meaning to first-order queries. Under both canonical-interpretation and compatible-interpretation semantics, no first-order formula in negation normal form can define the monus query—the subtraction operation used for relational difference—over the bag, tropical or fuzzy semirings. Because SQL uses bag semantics and truncated subtraction for bag difference, the authors conclude that these interpretation-based semantics cannot capture SQL semantics in full.
That conclusion is narrower than “provenance cannot model SQL.” It applies to the two interpretation schemes studied, to formulas in negation normal form, and to the monus operation. The paper explicitly leaves open which other positive semirings with monus might admit an equivalence between those formula semantics and basic relational algebra.
Why one tuple is enough
The bag-semiring proof uses a database whose active domain contains a single value. Relation R gives that value multiplicity 3 and S gives it multiplicity 2, so bag difference must return multiplicity 1. The authors show by induction that every formula in the specified language evaluates on that database either to 0 or to at least 2. The required answer, 1, is therefore unreachable.
The singleton construction matters twice. First, it makes the counterexample independent of joins, schema size or query-planning behavior: two unary relations suffice. Second, on a singleton active domain the only compatible interpretation is the canonical one. The same construction therefore extends the impossibility result from canonical to compatible interpretations rather than requiring a separate large counterexample.
The paper supplies analogous constructions for the tropical and fuzzy semirings. It also derives a corollary for the polynomial provenance semiring N[X], because the compatible-interpretation limitation extends to positive semirings with monus that contain an isomorphic copy of the bag semiring.
What practitioners should take from it
This is an expressiveness result, not a runtime benchmark. It reports no systems experiment, latency measurement or comparison of provenance engines. Its practical value is architectural: a provenance representation can be useful for positive query structure yet still lack an operator needed to reproduce a database language’s semantics.
For SQL tooling, “supports provenance” is therefore not enough detail. A stronger evaluation should ask whether the system preserves multiplicities and can represent difference under the database’s actual bag semantics. Otherwise, a lineage explanation may describe how rows were combined while failing on the semantics of removing them.
sources
comments · 0