Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate& Darwin? [M.Gittens]

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

From: Paul <paul_at_test.com>
Date: Tue, 07 Jun 2005 13:23:32 +0100
Message-ID: <42a591c4$0$41901$ed2619ec@ptn-nntp-reader03.plus.net>


Alfredo Novoa wrote:

>>Why not say then that all aggregates that involve a NULL return NULL?

>
> This is what SQL does. Sometimes we want to get a value but we get a
> null instead.

Are you sure? I've just tried summing a column that contains a NULL in PostgreSQL and it doesn't return NULL - it treats the NULLs as zeros.

>>So could this actually be another problem with SQL's treatment of NULLs
>>rather than with NULLs per se?

>
> This problem is inherent to nulls.

I'm not asking whether the fact that NULLs are cumbersome and errorprone is inherent to NULLs, but whether a DBMS with NULLs will always have queries that return incorrect results (as per Date's example with the EXISTS clause).

Could it be that a variant of SQL exists that has NULLs, so might be considered cumbersome (a somewhat subjective opinion?), but has zero logical inconsistencies?

Paul. Received on Tue Jun 07 2005 - 07:23:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US