论文标题
与SQL NULL值的关系代数和微积分
Relational Algebra and Calculus with SQL Null Values
论文作者
论文摘要
自从CODD的关系模型中引入了数据库中的无效的逻辑一直是调查的主题,该模型是SQL标准的基础。我们通过首先关注具有无效的标准关系代数值的简单延伸值的SQL的一阶片段的逻辑表征,该伸展的值精确地捕获了SQL片段,然后提出了两个不同的域关系计算,而该域的值是无效的语言值,但它不显示为语义解释的元素。在一个微积分中,关系可以看作是一组部分元素,而在另一个(等效)微积分中,关系水平分解为一组关系,每个关系都持有常规总元素。我们通过在存在SQL NULL值的情况下证明关系代数与两个域关系计算的等效性来扩展CODD的定理。
The logic of nulls in databases has been subject of investigation since their introduction in Codd's Relational Model, which is the foundation of the SQL standard. We show a logical characterisation of a first-order fragment of SQL with null values, by first focussing on a simple extension with null values of standard relational algebra, which captures exactly the SQL fragment, and then proposing two different domain relational calculi, in which the null value is a term of the language but it does not appear as an element of the semantic interpretation domain of the logics. In one calculus, a relation can be seen as a set of partial tuples, while in the other (equivalent) calculus, a relation is horizontally decomposed as a set of relations each one holding regular total tuples. We extend Codd's theorem by proving the equivalence of the relational algebra with both domain relational calculi in presence of SQL null values.