Re: Null in subquery returns no records

From: Jerome H. Gitomer <jgitomer_at_erols.com>
Date: Mon, 09 Feb 2004 23:51:06 -0500
Message-ID: <4028632d$0$3209$61fed72c_at_news.rcn.com>


Dawn M. Wolthuis wrote:
> If NULL is considered to an "un" value then at least a three-valued logic
> must be employed to handle the fact that a NULL value is not equal to a NULL
> value, right?
>

The concept of NULL values and equality is foreign to RDBMS. Variables are not equal or unequal to NULL. SQL syntax does not allow:

        WHERE variable = NULL

It does allow:

        WHERE variable IS NULL

It may seem like a nit picking technicality, but then computer languages are based on nit picking technicalities.

> A null set as the value of a variable is a value equal to another null set
> value.
>
Since we are talking about RDBMS and not pure math please define what you consider to be a set using relational terminology. The   only entity that Codd defined that contains more than one value is the table. Tables cannot be NULL. Once they have been defined their structure exists and therefore they cannot be NULL.

> The relational model itself does not require a three-valued logic and you
> can find Date and others argue in favor of a two-valued logic instead.

There are some who argue that we should have three different types of unknown instead of just one. So what?

> There are numerous databases the employ the much more intuitive two-valued
> logic but I know of no implementations of the relational model that do.
>

If they did they would deviate from Codd's definition.

        [ snip ]
Jerry Received on Tue Feb 10 2004 - 05:51:06 CET

Original text of this message