🤖 AI Summary
This paper investigates the tractability of semiring aggregate conjunctive queries with GROUP-BY projections (e.g., AJAR/FAQ). Addressing the limitation of existing free-connex decompositions—which fail to capture the complexity of projection-aware aggregation—we introduce **project-connex treewidth**, a novel structural parameter, along with its associated project-connex tree decomposition. This framework uniformly characterizes tractability for enumeration, counting, and semiring aggregation of conjunctive queries. Building upon it, we devise a generic evaluation algorithm that integrates semiring algebraic semantics with syntactic query structure. We prove that when project-connex treewidth is bounded, query results can be enumerated with constant delay or counted in polynomial time. Moreover, the required decomposition is constructible efficiently via classical tree decomposition algorithms.
📝 Abstract
We introduce 'project-connex' tree-width as a measure of tractability for counting and aggregate conjunctive queries over semirings with 'group-by' projection (also known as 'AJAR' or 'FAQ' queries). This elementary measure allows to obtain comparable complexity bounds to the ones obtained by previous structural conditions tailored for efficient evaluation of semiring aggregate queries, enumeration algorithms of conjunctive queries, and tractability of counting answers to conjunctive queries.
Project-connex tree decompositions are defined as the natural extension of the known notion of 'free-connex' decompositions. They allow for a unified, simple and intuitive algorithmic manipulation for evaluation of aggregate queries and explain some existing tractability results on conjunctive query enumeration, counting conjunctive query evaluation, and evaluation of semiring aggregate queries. Using this measure we also recover results relating tractable classes of counting conjunctive queries and bounded free-connex tree-width, or the constant-time delay enumeration of semiring aggregate queries over bounded project-connex classes. We further show that project-connex tree decompositions can be obtained via algorithms for computing classical tree decompositions.