Codd's rule of entity integrity stipulates that every table has a primary key. Hence, the attributes of the primary key carry unique and complete value combinations. In practice, data cannot always meet such requirements. Previous work proposed the superior notion of key sets for controlling entity integrity. We establish a linear-time algorithm for validating whether a given key set holds on a given data set, and demonstrate its efficiency on real-world data. We establish a binary axiomatization for the associated implication problem, and prove its coNP-completeness. However, the implication of unary by arbitrary key sets has better properties. The fragment enjoys a unary axiomatization and is decidable in quadratic time. Hence, we can minimize overheads before validating key sets. While perfect models do not always exist in general, we show how to compute them for any instance of our fragment. This provides computational support towards the acquisition of key sets.
翻译:Codd的实体完整性规则规定,每个表格都有一个主键。 因此, 主键的属性包含独特和完整的值组合。 在实践中, 数据不能总是满足这样的要求。 先前的工作提出了控制实体完整性的高级键组概念 。 我们为验证某个特定键组是否保留在给定数据集上, 并展示其在真实世界数据上的效率, 我们为相关的隐含问题建立二进制分解, 并证明它的 CoNP 完整性 。 但是, 任意键组的单词具有更好的特性。 碎片具有单反常的特性, 在四进制时可以分解 。 因此, 我们可以在验证关键组之前将间接值最小化 。 虽然不总是存在完美的模型, 但是我们通常会显示如何在任何实例中计算这些元件 。 这为获取密钥集提供了计算支持 。