Answering Conjunctive Queries with Aggregations under Updates

📅 2026-07-26
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the efficient maintenance of conjunctive queries (CQs) with semiring aggregations—such as SUM, COUNT, and shortest paths—in dynamic environments. It introduces a new class of “strong-connex” queries that precisely characterizes the maintainability boundary under insertions. By leveraging the algebraic structure of semirings and complexity-theoretic assumptions including OuMv/OMv and k-clique, the paper establishes conditional lower bounds and presents a unified algorithmic framework. The main results include O(1) amortized-time maintenance for all strong-connex CQs under insertions, and O(1)-time maintenance under arbitrary updates for q-hierarchical CQs when the semiring supports O(1) deletion. Furthermore, it proves that non-strong-connex CQs cannot be maintained in O(|D|^{1/2−ε}) time, yielding tight upper and lower bounds.
📝 Abstract
Dynamic query processing keeps query answers up to date during insertions and deletions. For conjunctive queries (CQs) under set semantics, the maintainable classes are known exactly: the $q$-hierarchical CQs under arbitrary updates, widening to the free-connex CQs under insertion-only updates. But modern analytics aggregates, including bag counting, SUM/COUNT, provenance, access control, and shortest paths---all captured by evaluating a CQ over a positive commutative semiring. We ask whether aggregation changes what can be maintained efficiently, and if so, when. Under arbitrary updates, it does not: maintenance is at least as hard as over the Boolean semiring. Under insertion-only updates, it does: the boundary retreats from free-connex to a new class we call strong-connex, with $q$-hierarchical $\subsetneq$ strong-connex $\subsetneq$ free-connex $\subsetneq$ acyclic. For every ordered semiring carrying a suitable monotone sequence (e.g., sum-product and tropical), no free-connex but non-strong-connex CQ is maintainable in $O(|D|^{1/2-ε})$ time under the OuMv and OMv conjectures. We further strengthen this lower bound into a family parameterized by the height and dimension of the query, under the combinatorial $k$-clique and generalized OuMv conjectures; these quantify how far the annotated hardness grows as the queries scale. On the algorithmic side, a single framework matches these boundaries by adapting CROWN to annotated relations. It maintains every strong-connex CQ in $O(1)$ amortized time under insertion-only updates, regardless of the underlying semiring. Moreover, under arbitrary updates, it maintains every $q$-hierarchical CQ in $O(1)$ amortized time if the semiring has $O(1)$-deletable aggregations. Together, the upper and lower bounds give query- and semiring-parameterized dichotomies that recover the Boolean picture and pinpoint the hardness aggregation adds.
Problem

Research questions and friction points this paper is trying to address.

Conjunctive Queries
Aggregation
Dynamic Query Processing
Semiring
Maintainability
Innovation

Methods, ideas, or system contributions that make the work stand out.

conjunctive queries
dynamic maintenance
semiring aggregation
strong-connex
fine-grained complexity
🔎 Similar Papers
2024-04-15Annual Meeting of the Association for Computational LinguisticsCitations: 4