From: Andrew G. Hammond <drew@xyzzy.dhs.org>
To: Archibald Zimonyi <archie@netg.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: NULL values or not?
Date: 22 Dec 2001 01:32:54 -0500
Message-ID: <1009002775.1903.3.camel@xyzzy> (raw)
In-Reply-To: <Pine.LNX.4.21.0112211045420.15695-100000@valdez.netg.se>
References: <Pine.LNX.4.21.0112211045420.15695-100000@valdez.netg.se>
> As I wrote, I usually try to avoid NULL values, thus creating my tables as
> the first example. What kind of thumb rules do you use when it comes to
> NULL values? Again, I am referring to my vampire database which I named a
> few days ago (btw, without VACUUM the SELECT statement takes less then a
> second) and I am planning on making less tables where I can. But it still
> feels wrong to add NULL values when I can avoid them.
Using a seperate table for phone numbers makes sense if you need to keep
track of multiple phone numbers per person or multiple people per phone
number. Otherwise it's pointless. You add unnecessary and useless
complexity to your system. Null values to indicate null data make
perfect sense. I'm a strong believer in the KISS principal:
Keep It Short & Simple.
--
Andrew G. Hammond mailto:drew@xyzzy.dhs.org
http://xyzzy.dhs.org/~drew/
56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F
613-389-5481
5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: drew@xyzzy.dhs.org, archie@netg.se
Subject: Re: NULL values or not?
In-Reply-To: <1009002775.1903.3.camel@xyzzy>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox