Re: [ISSUE-41 and ISSUE-42] What do people think of NULLs

On 18 May 2011, at 06:52, Juan Sequeda wrote:

> Seems like an unofficial consensus is to completely ignore NULL values.

This is also not information preserving wrt the normative behaviour in SQL.
This shows up when there is an update: you can update a null value, since it is compatible with the schema; on the other hand, you can not update a missing value if there is no attribute in the schema. The NULL values also affect aggregated queries, so they can not be ignored.
The SQL way is to introduce a special NULL constant *and* requiring that the queries introduce an inequality test for all join variables (which should never be equal to NULL). This introduces no additional cost in terms of query answering complexity (indeed SQL NULL values are efficient); it is rather expensive in terms of reasoning over queries, e.g., query containment (see [1]), since it introduces inequality in the queries.

[1] Containment of Conjunctive Queries over Databases with Null Values, by C. Farré and W. Nutt and E. Teniente and T. Urpí; <>.

Received on Wednesday, 18 May 2011 07:46:15 UTC