Received: from fep1.cogeco.net (smtp.cogeco.net [216.221.81.25]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBM6X2m31774 for ; Sat, 22 Dec 2001 01:33:03 -0500 (EST) (envelope-from drew@xyzzy.dhs.org) Received: from xyzzy.lan.internal (d226-80-168.home.cgocable.net [24.226.80.168]) by fep1.cogeco.net (Postfix) with ESMTP id CC4243782; Sat, 22 Dec 2001 01:32:56 -0500 (EST) Received: from localhost ([127.0.0.1] ident=drew) by xyzzy.lan.internal with esmtp (Exim 3.33 #1 (Debian)) id 16HfiJ-0001EE-00; Sat, 22 Dec 2001 01:32:55 -0500 Subject: Re: NULL values or not? From: "Andrew G. Hammond" To: Archibald Zimonyi Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-f2/foaQFOjKm8n/8x09b" X-Mailer: Evolution/1.0 (Preview Release) Date: 22 Dec 2001 01:32:54 -0500 Message-Id: <1009002775.1903.3.camel@xyzzy> Mime-Version: 1.0 X-Archive-Number: 200112/239 X-Sequence-Number: 6061 --=-f2/foaQFOjKm8n/8x09b Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > 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. --=20 Andrew G. Hammond mailto:drew@xyzzy.dhs.org=20=20 http://xyzzy.dhs.org/~drew/ 56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 613-389-5481 5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1 "To blow recursion you must first blow recur" -- me --=-f2/foaQFOjKm8n/8x09b Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iQCVAwUAPCQpFcaBTSA3ULb1AQL97wP+J8oYp8CjVWr2oN04HFoY0QA7K6KUO4eQ YkbzWq4wblIOb/MKxe9OKRoqP7DeU3GDgVLWXKaSSksUqm3bVA/1yeoRkI0C4xL9 YwmTIy4sMrez9EDJppeU1J7DnEjzpsA3bkyEsL8EEvNjz48H2Mz9NCvGNhyhWBuB 4+dvglQdjVs= =ehX3 -----END PGP SIGNATURE----- --=-f2/foaQFOjKm8n/8x09b--