Re: Does Codd's view of a relational database differ from that ofDate & Darwin? [M.Gittens]

From: Alexandr Savinov <savinov_at_host.com>
Date: Wed, 08 Jun 2005 14:58:30 +0200
Message-ID: <42a6eb89$1_at_news.fhg.de>


Ged Byrne schrieb:
> In TTM the empty set is modelled by TABLE_DEE and TABLE_DUM.
>
> Empty sets are different from NULLs because an empty set tells you
> something.
>
> If I ask for all children of John and the result is an empty set, then
> I know that John has no children.

Then if you ask what values has attribute Price (of product) then you might get the following results:
$25 - a singular value

NULL - absence of value (empty set)
UNKNOWN - a single value but uknown (we know that the value has been asigned but it is unknown)

So I find NULL and empty set formally equivalent. But I do not argue that in many cases we would like to distinguish them. For example, NULL is frequently used in attribute-value context while empty set is used in manipulating various types of collections.

> NULL simply means UNKNOWN.

Ok, you are not alone. Several people in this thread also think so. But I think that the semantics of UNKNOWN and NULL is completely different.

> If the result to the children of John query is NULL, this means that I
> do not know how many children John has.

So you simply assume that NULL designates unknown.

If SQL could return NULL as a result of query then I would interpret it as John has no children. The value UNKNOWN can hardly be used in contemporary databases so it needs to be interpreted by users themselves (encoded in queries, stored procedures etc.)

> If anything, NULL probably relates to the universal set, since its
> presences means that anything is possible.

There are several questions:
1. What special values and special semantics we need (unknown, absence (empty), ...)
2. How to designate them (NULL, UNKNOWN, ANY, SOMETHING,...) 3. How they are implemented in DBMSs for various operations (aggregation, joins, selections,...)
4. How data models and SLQ treats them.

-- 
alex
http://conceptoriented.com
Received on Wed Jun 08 2005 - 14:58:30 CEST

Original text of this message