Re: PostgreSQL Certification

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: PostgreSQL Certification
Дата
Msg-id 60oevye751.fsf@dev6.int.libertyrms.info
обсуждение исходный текст
Ответ на Re: PostgreSQL Certification  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: PostgreSQL Certification  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-advocacy
Jon.Ericson@jpl.nasa.gov (Jon Ericson) writes:
> Christopher Browne <cbbrowne@acm.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

В списке pgsql-advocacy по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Press Release
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: PostgreSQL Certification