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,并证明该类包含且仅包含所有支持简约计数的无自连接合取查询。