pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kostyrka <andreas@mtg.co.at>
To: Victor Yegorov <viktors.jegorovs@nordlb.lv>
Cc: Jeandre du Toit <jeandre@itvs.co.za>
Cc: pgsql-performance@postgresql.org
Subject: Re: Table Relationships
Date: 12 Jun 2003 11:32:09 +0200
Message-ID: <1055357830.5850.5.camel@andi-lap> (raw)
In-Reply-To: <20030530101009.GD23596@nordlb.lv>
References: <001c01c32689$82da1050$0403a8c0@fejleszt4>
	<Pine.LNX.4.44.0305301118040.6124-100000@localhost.localdomain>
	<20030530101009.GD23596@nordlb.lv>

On Fri, 2003-05-30 at 12:10, Victor Yegorov wrote:
> Take a look at situation from another side.
> 
> 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.
> 
> So, each time a customer will by a product, an new record will be added.
> What this means:
> 
> 1. Customer's name will be repeated as many times, as many purchases he had
>    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

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (12+ messages)

Message-ID: <1055357830.5850.5.camel@andi-lap>
Permalink:  ../1055357830.5850.5.camel@andi-lap/
Also on:    postgresql.org/message-id/1055357830.5850.5.camel@andi-lap

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: andreas@mtg.co.at, viktors.jegorovs@nordlb.lv, jeandre@itvs.co.za
  Subject: Re: Table Relationships
  In-Reply-To: <1055357830.5850.5.camel@andi-lap>
  References: <001c01c32689$82da1050$0403a8c0@fejleszt4> <Pine.LNX.4.44.0305301118040.6124-100000@localhost.localdomain> <20030530101009.GD23596@nordlb.lv> <1055357830.5850.5.camel@andi-lap>

* 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