This research paper introduces two new constraint types and four subtypes of database constraints added to our (Elementary) Mathematical Data Model, which are the duals of the existence and non-existence ones. They are formally defined, characterized, and exemplified with real-life instances. The well-formedness, satisfiability, coherence, and minimality of sets of all 7 subtypes of existence constraints are studied. Corresponding SQL-embedded pseudocode algorithms for managing such sets are provided and proved to be of constant complexity, sound, complete, and optimal. Also provided are algorithms for enforcing these new types of constraints, called inexistence and anti-existence. Their characterization proves that they have linear complexity in the sum of the arities of the function (Cartesian product)s involved, and are sound, complete, and optimal as well. All these algorithms were implemented in both versions of our intelligent data and knowledge base management system prototype MatBase, which automatically generates code for enforcing all the 7 subtypes of existence constraints.
翻译:本研究提出两种新的数据库约束类型及其四个子类型,并将其添加至我们的(基础)数学数据模型中,这些约束类型是存在约束与不存在约束的对偶形式。本文对它们进行了形式化定义、特征描述,并通过实际案例加以例证。研究了全部7种存在约束子类型集合的良构性、可满足性、一致性与极小性。提供了用于管理此类集合的SQL嵌入式伪代码算法,并证明其具有常数复杂度、可靠性、完备性与最优性。同时提供了实施这些新类型约束(即不存在约束与反存在约束)的算法。特征分析表明,这些算法的时间复杂度与所涉及函数(笛卡尔积)的元数之和呈线性关系,并且同样具备可靠性、完备性与最优性。所有算法均已在我们智能数据库与知识库管理系统原型MatBase的两个版本中实现,该系统可自动生成实施全部7种存在约束子类型的代码。