X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 8766230F963 for ; Tue, 24 Jun 2003 15:38:23 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 32786-08 for ; Tue, 24 Jun 2003 12:38:13 -0300 (ADT) Received: from irko.smoothcorp.com (unknown [208.49.241.41]) by svr1.postgresql.org (Postfix) with ESMTP id DE7A830F958 for ; Tue, 24 Jun 2003 12:38:12 -0300 (ADT) Received: from jgardner.ifloor.com ([10.0.1.63]) by irko.smoothcorp.com with esmtp (Exim 4.12) id 19Ups2-0003tH-00; Tue, 24 Jun 2003 08:38:10 -0700 Received: from jgardner.ifloor.com (localhost.localdomain [127.0.0.1]) by jgardner.ifloor.com (8.12.8/8.12.8) with ESMTP id h5OFcBHK007376; Tue, 24 Jun 2003 08:38:11 -0700 Received: from localhost (localhost [[UNIX: localhost]]) by jgardner.ifloor.com (8.12.8/8.12.8/Submit) id h5OFcAJQ007374; Tue, 24 Jun 2003 08:38:10 -0700 From: Jonathan Gardner To: Rudi Starcevic , pgsql-sql@postgresql.org Subject: Re: Database design - AGAIN Date: Tue, 24 Jun 2003 08:38:04 -0700 User-Agent: KMail/1.5 References: <3EF7DF74.40700@oasis.net.au> In-Reply-To: <3EF7DF74.40700@oasis.net.au> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200306240838.09929.jgardner@jonathangardner.net> X-SA-Exim-Rcpt-To: rudi@oasis.net.au, pgsql-sql@postgresql.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Archive-Number: 200306/283 X-Sequence-Number: 14041 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 23 June 2003 22:19, Rudi Starcevic wrote: > I"m not sure whether to have on larger table or 2 smaller one with a > join table. Theory says you are better off with the join tables. Practical reality agre= es=20 with this. It takes a bit more work to write your select statements, but th= e=20 data is better for at least these two reasons: 1) You won't have a lot of empty columns. 2) You will be able to add, rename, and remove features pretty easily. There are more reasons, but they are not immediately obvious to the untrain= ed=20 DBA. (Words like "data integrity" and "data consistency" start to mean thin= gs=20 when you become trained.) With that said, it sounds like you are really intermediate with database=20 design. If you were a beginner, and if you barely understood what a table= =20 was, (and if you were the guy who would be using it all the time,) I would= =20 probably suggest you use the former method. It will work pretty well until= =20 you want to add more features or until you start worrying about your databa= se=20 size. At that point, I would explain how and why to use joins, and how to= =20 convert your data over to the new design. - --=20 Jonathan Gardner (was jgardn@alumni.washington.edu) Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE++HBcWgwF3QvpWNwRAgjPAJ48syjGQahHvU4zi38WVheFbVFC5ACfQw5S 0qO67ZB2ToO4zFJKoh5GtrU=3D =3DPnFr -----END PGP SIGNATURE-----