Null and Void() - Or, Abandon All Hope Ye Who allow NULLs? - Mailing list pgsql-general

From dananrg@yahoo.com
Subject Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?
Date
Msg-id 1151487080.346698.274190@b68g2000cwa.googlegroups.com
Whole thread Raw
Responses Re: Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?  (dananrg@yahoo.com)
Re: Null and Void() - Or, Abandon All Hope Ye Who allow  ("Florian G. Pflug" <fgp@phlo.org>)
Re: Null and Void() - Or,  ("A.M." <agentm@themactionfaction.com>)
Re: Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?  (David Fetter <david@fetter.org>)
Re: Null and Void() - Or, Abandon All Hope Ye Who allow  (Scott Ribe <scott_ribe@killerbytes.com>)
List pgsql-general
Date and Pascal hate nulls. One even goes so far as to say that if you
permit NULLs in a database, then the results from *every* query is
suspect. So they turn perform backflips suggesting ways to avoid nulls.
None, so far, seem appealing.

To me, nulls are quite useful in the Real World. For instance, there
may be a lot of immediate value for end users in committing a row that
has a few nulls (e.g. as in not yet collected), rather than slavishly
follow a rule that says Thou Shalt Not commit a row with nulls.

Can't the intelligent practitioner simply proceed carefully with
queries when nulls are involved? With group functions at least, I
believe nulls are ignored. In Oracle, you can use NVL() to force group
functions to recognize.

What about simply doing an IS NULL test in the code when any table that
allows nulls in involved in a query?

What precisely has Date and Pascal's knickers in such a twist? The fact
that ad hoc queries from random, unintelligent users could give strange
results?

What if one has control over the queries performed through a GUI or
application? Doesn't the problem disappear, presuming the programmer is
aware of the issue and the application is well documented?

What are some of the best ways to deal with the issue of nulls
potentially resulting in questionable query results short of
disallowing them? Storing some sort of coded or numeric value that
represents UNKNOWN or NOT APPLICABLE.


pgsql-general by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: UUID's as primary keys
Next
From: dananrg@yahoo.com
Date:
Subject: Re: Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?