The problem of consistent query answering for primary keys and self-join-free conjunctive queries has been intensively studied in recent years and is by now well understood. In this paper, we study an extension of this problem with counting. The queries we consider count how many times each value occurs in a designated (possibly composite) column of an answer to a full conjunctive query. In a setting of database repairs, we adopt the semantics of [Arenas et al., ICDT 2001] which computes tight lower and upper bounds on these counts, where the bounds are taken over all repairs. Ariel Fuxman defined in his PhD thesis a syntactic class of queries, called C_forest, for which this computation can be done by executing two first-order queries (one for lower bounds, and one for upper bounds) followed by simple counting steps. We use the term "parsimonious counting" for this computation. A natural question is whether C_forest contains all self-join-free conjunctive queries that admit parsimonious counting. We answer this question negatively. We define a new syntactic class of queries, called C_parsimony, and prove that it contains all (and only) self-join-free conjunctive queries that admit parsimonious counting.
翻译:近年来,针对主键和无自连接合取查询的一致性答案查询问题已被广泛研究且理解已相当透彻。本文研究了该问题的计数扩展。所考虑查询统计每个值在完整合取查询答案的指定(可能复合)列中出现的次数。在数据库修复框架下,我们采用[Arenas等, ICDT 2001]的语义,该语义计算这些计数的最小和最大边界,其中边界在所有修复方案中取值。Ariel Fuxman在其博士论文中定义了一个语法查询类C_forest,可通过执行两个一阶查询(一个用于下界,一个用于上界)后接简单计数步骤实现此类计算。我们将此计算称为“精简计数”。一个自然问题是C_forest是否包含所有可实现精简计数的无自连接合取查询。我们对此给出否定答案。我们定义了一个新的语法查询类C_parsimony,并证明它包含所有(且仅包含)可实现精简计数的无自连接合取查询。