Denial Constraint (DC) is a well-established formalism that captures a wide range of integrity constraints commonly encountered, including candidate keys, functional dependencies, and ordering constraints, among others. Given their significance, there has been considerable research interest in achieving fast verification and discovery of exact DCs within the database community. Despite the significant advancements in the field, prior work exhibits notable limitations when confronted with large-scale datasets. The current state-of-the-art exact DC verification algorithm demonstrates a quadratic (worst-case) time complexity relative to the dataset's number of rows. In the context of DC discovery, existing methodologies rely on a two-step algorithm that commences with an expensive data structure-building phase, often requiring hours to complete even for datasets containing only a few million rows. Consequently, users are left without any insights into the DCs that hold on their dataset until this lengthy building phase concludes. In this paper, we introduce Rapidash, a comprehensive framework for DC verification and discovery. Our work makes a dual contribution. First, we establish a connection between orthogonal range search and DC verification. We introduce a novel exact DC verification algorithm that demonstrates near-linear time complexity, representing a theoretical improvement over prior work. Second, we propose an anytime DC discovery algorithm that leverages our novel verification algorithm to gradually provide DCs to users, eliminating the need for the time-intensive building phase observed in prior work. To validate the effectiveness of our algorithms, we conduct extensive evaluations on four large-scale production datasets. Our results reveal that our DC verification algorithm achieves up to 40 times faster performance compared to state-of-the-art approaches.
翻译:否定约束(Denial Constraint, DC)是一种成熟的规范化形式,能够捕获包括候选键、函数依赖和排序约束在内的广泛常见完整性约束。鉴于其重要性,数据库社区对快速验证和发现精确DC的研究兴趣一直十分浓厚。尽管该领域已取得显著进展,但先前的工作在处理大规模数据集时仍表现出明显局限性。当前最先进的精确DC验证算法在时间复杂度上(最坏情况下)与数据集行数呈二次关系。在DC发现方面,现有方法依赖于两阶段算法,该算法以耗时的数据结构构建阶段开始,即便是仅包含数百万行数据集,这一构建阶段也常需数小时才能完成。因此,用户在此漫长的构建阶段结束前无法获得关于其数据集上成立的DC的任何洞察。在本文中,我们介绍Rapidash,一个用于DC验证与发现的综合框架。我们的工作做出了双重贡献。首先,我们建立了正交范围搜索与DC验证之间的联系。我们提出一种新颖的精确DC验证算法,该算法展现出近线性时间复杂度,这代表了对先前工作的理论改进。其次,我们提出一种任意时间(anytime)DC发现算法,该算法利用我们新颖的验证算法逐步向用户提供DC,从而消除了先前工作中耗时的构建阶段。为了验证我们算法的有效性,我们在四个大规模生产数据集上进行了广泛评估。结果表明,与最先进方法相比,我们的DC验证算法实现了高达40倍的性能提升。