Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL Certification

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: PostgreSQL Certification
Date: 2003-10-30 21:40:42
Message-ID: 60oevye751.fsf@dev6.int.libertyrms.info (view raw or flat)
Thread:
Lists: pgsql-advocacy
Jon(dot)Ericson(at)jpl(dot)nasa(dot)gov (Jon Ericson) writes:
> Christopher Browne <cbbrowne(at)acm(dot)org> writes:
> [an outline of a tutorial]
>>   - Why avoid NULLs?
>
> I'm curious about the answer to that question.  Is it a relational
> database theory problem or PostgreSQL implementation issue?  Or do
> you just talk about inappropriate uses of NULL?

It somewhat parallels the infamous "GOTO considered harmful" that
caused great controversy around the ACM for many years after Dijkstra
sent in a letter by that title, and yes, it's an issue of "relational
database theory."

At one extreme, Chris Date holds to the position that NULLs ought to
be forbidden outright.  He does make a fairly credible case for it,
albeit with the problem that when you forbid NULLs, you have to
replace them by making the data model a little more complex.  (He
recently released a paper on how to do this; there's not much surprise
to it; whenever a column "could be NULL," you have to split it off to
a separate table so that its omission amounts to not bothering to
populate the new table...)

The other "major" position is that there should be multiple sorts of
'NULL' values to indicate different forms of missing information.
(One problem with NULL is that you can't easily distinguish between "I
left that NULL because I didn't know the value" and "That's NULL
because that's how we say it's 'empty.'")

I fall more into the pragmatic position that "NULL columns have the
potential to cause a lot of confusion; use NOT NULL when you can, and
be wary when you can't."

It's similar to how I feel about normalization; I would consider that
you should do as much of that as you can, but it is unlikely that a
data model will survive the normal collisions with business
requirements and still remain in 6NF.

The most entertaining comment I got in chatting with folks afterwards
was that one fellow held a "devil's advocate" position on putting
everything in 3NF.  A coworker of his, fresh out of school, was
claiming staunchly that it is NECESSARY to normalize things to at
least the point of getting to Third Normal Form.

Unfortunately, he couldn't articulate any reasons to do so beyond "My
professor told me that it's necessary."  I daresay that's _not_ a good
enough reason.  You need to internalize, at least to _some_ degree,
why normalization is valuable in order to successfully argue for it.
-- 
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://www.ntlug.org/~cbbrowne/sap.html
"This is very  curious ... as if someone was eating  the wrong sort of
mushrooms when they invented this sort of thing" -- Arthur Norman

In response to

Responses

pgsql-advocacy by date

Next:From: Jon EricsonDate: 2003-10-31 01:03:36
Subject: Re: PostgreSQL Certification
Previous:From: Arcadius A.Date: 2003-10-30 18:50:10
Subject: Re: Open Source (and PostgreSQL) in South Africa

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group