We study the complexity of enumerating the answers of Conjunctive Queries (CQs) in the presence of Functional Dependencies (FDs). Our focus is on the ability to list output tuples with a constant delay in between, following a linear-time preprocessing. A known dichotomy classifies the acyclic self-join-free CQs into those that admit such enumeration, and those that do not. However, this classification no longer holds in the common case where the database exhibits dependencies among attributes. That is, some queries that are classified as hard are in fact tractable if dependencies are accounted for. We establish a generalization of the dichotomy to accommodate FDs; hence, our classification determines which combination of a CQ and a set of FDs admits constant-delay enumeration with a linear-time preprocessing. In addition, we generalize a hardness result for cyclic CQs to accommodate a common type of FDs. Further conclusions of our development include a dichotomy for enumeration with linear delay, and a dichotomy for CQs with disequalities. Finally, we show that all our results apply to the known class of "cardinality dependencies" that generalize FDs (e.g., by stating an upper bound on the number of genres per movies, or friends per person).
翻译:我们研究在功能依赖关系(FDs)面前将CQ(CQs)的答案进行计算的复杂性。我们的重点是在线性预处理后,能否列出产出图例,在线性预处理后,在时间间隔之间不断拖延。已知的二分法将循环自join免费CQ分类为承认这种查点,而没有。然而,这种分类在数据库显示属性依赖性的常见情况下不再维持。也就是说,一些被归类为硬质的查询,如果考虑到依赖性,事实上是可以调取的。我们建立了对调的概括性,以容纳FD;因此,我们的分类决定了CQ和一组FD的组合,以线性预处理为条件。此外,我们一般地概括了周期性分类的硬性结果,以适应一种常见的FD。我们的发展的进一步结论包括以线性延迟计分解,以及对于CQ的分辨与不均匀性。最后,我们用一个已知的类别表示我们所有结果都适用于已知的FDM的等级。