Re: when to use NULL and when to NOT NULL DEFAULT ''

From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Miles Keaton <mileskeaton(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: when to use NULL and when to NOT NULL DEFAULT ''
Date: 2004-10-08 11:12:35
Message-ID: 41667623.3080301@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut wrote:
> Am Freitag, 8. Oktober 2004 07:22 schrieb Miles Keaton:
>
>>What's the prevailing wisdom & best-practice advice about when to let
>>a varchar (or any) column be NULL, and when to make it NOT NULL
>>DEFAULT '' (or '0000-00-00' or whatever) - in PostgreSQL?
>
> Briefly, you always do the first and never do the second.

Speaking of NULLs, what does the relational model ideal suggest for
missing information?

a) no NULL at all;
b) NULL and N/A;

I've read both, a) in "handling missing information without NULLs"
articles and b) in Joe Celko's book ("Codd proposed two kind of missing
information: NULL for unknown and N/A for not applicable").

--
dave

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Terry Lee Tucker 2004-10-08 11:14:33 Re: when to use NULL and when to NOT NULL DEFAULT ''
Previous Message David Garamond 2004-10-08 11:09:23 Re: when to use NULL and when to NOT NULL DEFAULT ''