Semiring query interpretations cannot express SQL subtraction operation
Monus vs. Interpretations in Semiring Semantics
Databases
Summary
This paper looks at specific ways to understand how database queries work when the data includes extra information called semiring annotations. The authors find that two common interpretation methods for queries in such databases cannot perform the 'monus' operation, which is similar to subtraction. This means that these methods cannot fully capture how SQL handles certain operations. Their findings limit how these interpretation techniques can be used to represent database query semantics.
What this means in practice
- •For database system designers: Avoid using canonical or compatible interpretation semantics alone when implementing full SQL semantics involving subtraction-like operations on annotated data.
- •For query engine developers: Recognize that current interpretation-based semantic methods cannot represent monus operations, influencing optimization and processing strategies for semiring-annotated queries.
A theory result. No direct application yet.
Authors
Phokion G. Kolaitis
Abstract
Interpretations have been widely used in the study of provenance of queries on semiring-annotated databases. Here, we consider two different interpretation-based semantics for first-order formulas in negation normal form, namely, the canonical-interpretation semantics and the compatible-interpretation semantics. We show that the resulting query languages cannot express the monus operation on semiring-annotated relations, when the annotations come from the bag semiring or the tropical semiring or the fuzzy semiring. Consequently, the semantics of SQL cannot be captured using the interpretation-based semantics considered here.