arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Computer Networks and Communications

The Algebra and the Logic for SQL Nulls.

Enrico Franconi, Sergio Tessaris

· View

See on the map

Abstract

Abstract 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. In the logic based approaches to modelling relational databases proposed so far, nulls are considered as representing unknown values. Such existential semantics fails to capture the behaviour of the SQL standard. We show that, according to Codd’s Relational Model, a SQL null value represents a non-existing value; as a consequence no indeterminacy is introduced by SQL null values. We show that the domain independent fragment of the extension of first-order logic accounting for predicates with missing arguments is equivalent to Codd’s relational algebra with SQL nulls. Moreover, we illustrate a faithful encoding of the logic into standard first-order logic. At the end, we show how to capture in this framework the UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints as defined in the SQL:1999 standard. 1 Relational Databases and SQL Null Values Consider a database instance with null values over the relational schema {R/2}, and an SQL query asking for the tuples in R being equal to themselves: R: 1 2 a b b N

More like this