Re: NULL values or not?

From: "Andrew G(dot) Hammond" <drew(at)xyzzy(dot)dhs(dot)org>
To: Archibald Zimonyi <archie(at)netg(dot)se>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: NULL values or not?
Date: 2001-12-22 06:32:54
Message-ID: 1009002775.1903.3.camel@xyzzy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> 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(at)xyzzy(dot)dhs(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Archibald Zimonyi 2001-12-22 09:30:31 Re: NULL values or not?
Previous Message Wei Weng 2001-12-21 21:37:52 Re: NULL values or not?