Containment of Conjunctive Queries with Negative Information over Semirings
Guillermo Badia, Carles Noguera, Gaia Petreni, Alice Portone, Val Tannen
Key points
From the paper's conclusion- We study the containment problem for (unions of) conjunctive queries ((U)CQs) with negative information on semiring-annotated databases.
Abstract
We study the containment problem for (unions of) conjunctive queries ((U)CQs) with negative information on semiring-annotated databases. Our approach to negative information follows the treatment of negation proposed by Gr\"adel and Tannen (2017, 2019, 2021 and 2024) for first-order logic and fixed point logic which applies productively to large classes of semirings, including bounded distributive lattices, as well as the important provenance semirings studied for positive CQ containment by Green (2009). Negation features in (U)CQs along two dimensions: negated equalities (disequations), and negated relational atoms. We study complexity for each of them separately, as well as jointly. For disequations, we extend a methodology that proves the same complexity bounds as the ones already known for the standard Boolean semiring (in the second level of the polynomial hierarchy) for most semirings of interest. Two prominent exceptions are $\mathbb{N}[X]$ and Trio(X) where the complexity bound for containment is in the second level of the counting hierarchy. For CQs with negated relational atoms we show that the complexity, surprisingly, is the same as that of the containment of CQs without negation when one considers model-defining and provenance-tracking interpretations (namely, nondeterministic polynomial time). Interestingly, among bounded distributive lattices, the Boolean two-element case is the only one where the complexity of the problem continues to be hard for the second level of the polynomial hierarchy for model-defining interpretations. Furthermore, we show that the complexity increases again for distributive lattices if we focus on other classes of interpretations. Finally, we consider queries that have both negated equalities and negated relational atoms and show that the complexity of containment continues to be that of the case with just negated equalities.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Monus vs. Interpretations in Semiring SemanticsarXiv · 2026
- Attacking Diophantus: Special Cases of Bag ContainmentarXiv · 2026
- Extremal Fitting Problems for Conjunctive QueriesJournal of the ACM · 2026
- Few Rows Tell Them Apart: Equivalence of Queries Mixing Set and Bag SemanticsarXiv · 2026
- Testability of Homomorphism Inadmissibility: Property Testing Meets Database TheoryarXiv · 2026
- An Intrinsic Additive Quotient for Classical Propositional LogicStudia Logica · 2026