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

From: mountain man <hobbit_at_southern_seaweed.com.op>
Date: Tue, 07 Jun 2005 09:32:44 GMT
Message-ID: <0Rdpe.6593$F7.2252_at_news-server.bigpond.net.au>


"Paul" <paul_at_test.com> wrote:

> Here's some discussion of a very concrete example of a NULL problem in
> SQL: http://www.firstsql.com/iexist2.htm
>
> The author says that his RDBMS solves this problem though, and that is
> just a problem with SQL and NULLs, not with the relational model and
> NULLs.
>
> Are there any rebuttals of this claim that anyone has?

Yes, in respect of his "problem with SQL and nulls" note that his concrete problem as expressed in the above article is the behaviour of a standard query *converted* to using an "EXISTS" clause.

You'll note that there are absolutely no problems with the *standard* SQL query results, even though nulls exist in the base table.

Also, it should be pointed out that the author uses in the standard query (afterwards converted) sub-select statements, which are not necessary, and in fact probably exacerbate any problems.

The original query may be written as follows without the sub-select statement, and has no problems with the null.

select distinct spx.sno
from sp spx
where spx.pno = 'P1'
and spx.qty <> 1000

-- 
Pete Brown
IT Managers & Engineers
Falls Creek
Australia
www.mountainman.com.au
Received on Tue Jun 07 2005 - 11:32:44 CEST

Original text of this message