X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id C610930E71D for ; Thu, 12 Jun 2003 09:32:32 +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 21953-07 for ; Thu, 12 Jun 2003 06:32:21 -0300 (ADT) Received: from viefep15-int.chello.at (viefep15-int.chello.at [213.46.255.19]) by svr1.postgresql.org (Postfix) with ESMTP id 3D72130E68A for ; Thu, 12 Jun 2003 06:32:18 -0300 (ADT) Received: from andi-lap ([80.108.209.54]) by viefep15-int.chello.at (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030612093205.FIQB1476.viefep15-int.chello.at@andi-lap>; Thu, 12 Jun 2003 11:32:05 +0200 Received: by andi-lap (sSMTP sendmail emulation); Thu, 12 Jun 2003 11:32:09 +0200 Subject: Re: Table Relationships From: Andreas Kostyrka To: Victor Yegorov Cc: Jeandre du Toit , pgsql-performance@postgresql.org In-Reply-To: <20030530101009.GD23596@nordlb.lv> References: <001c01c32689$82da1050$0403a8c0@fejleszt4> <20030530101009.GD23596@nordlb.lv> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ViyGaq0SsXk06YrmMoFm" Organization: Message-Id: <1055357830.5850.5.camel@andi-lap> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 12 Jun 2003 11:32:09 +0200 X-Archive-Number: 200306/55 X-Sequence-Number: 2139 --=-ViyGaq0SsXk06YrmMoFm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-05-30 at 12:10, Victor Yegorov wrote: > Take a look at situation from another side. >=20 > Let's say: You own a store and have 3 customers and 5 products on your > store. All you going to keep in DB is track of all purchases. >=20 > So, each time a customer will by a product, an new record will be added. > What this means: >=20 > 1. Customer's name will be repeated as many times, as many purchases he h= ad > made. The same for each of products. In real world, you'll have about > 10,000 customers and about 100,000 products. Do you have enoght space = on > your disks to store all that stuff? Well, to play the devil's advocate, to do it correctly, you should probably store the customer data duplicate (one in the main record, and once in the purchase order). If you do not, you'll get an ERP system that is incapable to reproduce work done, which is basically a BAD THING(tm) :) > 2. Some of your customers decided to change it's name. What you're going = to > do? If you're going to insert new purchases of that customer with he's= new > name, then in all turnover reports you'll have to specify both: > old name and new one. If he will hange his name again - again, all > reports are to be updated. Well, again, a purchase order should keep records -> it shouldn't magically change the name or address of the customer, just because the customer moved. Andreas --=-ViyGaq0SsXk06YrmMoFm Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+53uGHJdudm4KnO0RAi4BAKDVfF+xXeWjQR14ZgRE6okJdwDQbQCgg+tg LimW7YtAKlcD+A37741ATX8= =zCRP -----END PGP SIGNATURE----- --=-ViyGaq0SsXk06YrmMoFm--