We study the complexity of various fundamental counting problems that arise in the context of incomplete databases, i.e., relational databases that can contain unknown values in the form of labeled nulls. Specifically, we assume that the domains of these unknown values are finite and, for a Boolean query $q$, we consider the following two problems: given as input an incomplete database $D$, (a) return the number of completions of $D$ that satisfy $q$; or (b) return the number of valuations of the nulls of $D$ yielding a completion that satisfies $q$. We obtain dichotomies between \#P-hardness and polynomial-time computability for these problems when $q$ is a self-join-free conjunctive query, and study the impact on the complexity of the following two restrictions: (1) every null occurs at most once in $D$ (what is called Codd tables); and (2) the domain of each null is the same. Roughly speaking, we show that counting completions is much harder than counting valuations: for instance, while the latter is always in \#P, we prove that the former is not in \#P under some widely believed theoretical complexity assumption. Moreover, we find that both (1) and (2) can reduce the complexity of our problems. We also study the approximability of these problems and show that, while counting valuations always has a fully polynomial-time randomized approximation scheme (FPRAS), in most cases counting completions does not. Finally, we consider more expressive query languages and situate our problems with respect to known complexity classes.
翻译:具体地说,我们假设这些未知值的领域是有限的,而对于Boolean的查询来说,我们考虑了以下两个问题:作为输入一个不完整的数据库,我们考虑的是以下两个问题:(a) 返回在不完全的数据库中产生的各种基本计算问题的复杂性,即:在数据库中,我们研究的是各种基本计算问题的复杂性,例如,在数据库中,由于输入了一个不完整的数据库,我们需要美元,(a) 返回一个符合美元美元数额的完成数;(b) 返回得出一个达到美元数额的完成数的无效数额的数值,即关系数据库。我们得到的不是以标定值为“硬度”和“多元时间-时间”为形式的差数。我们假定,当美元是一个无自join的连带查询时,我们考虑的是这两个问题,我们研究对以下两种限制的复杂性的影响:(1) 每一个无效数目最多一次以美元计算(即所谓的Cod表);(2) 每一无效数目是相同的。我们考虑的是,我们计算完成的难度比计算得起来要难得多。 (brough) 例如,最接近的准确性等级的等级的等级是, ——我们总是认为,最后的一个假设也是最后的一个问题。