pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antoine Reid <fluke@kernel-panic.net>
To: Patrick Jacquot <patrick.jacquot@anpe.fr>
Cc: John <john@akadine.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: confused by select.
Date: Fri, 7 Jul 2000 15:32:23 -0400
Message-ID: <20000707153223.A22141@inertia.home.kernel-panic.net> (raw)
In-Reply-To: <3965A67C.9D1E6869@anpe.fr>
References: <Pine.BSF.4.21.0007061558550.13354-100000@db.akadine.com>
	<3965A67C.9D1E6869@anpe.fr>

On Fri, Jul 07, 2000 at 11:44:30AM +0200, Patrick Jacquot wrote:
[snip]
> 
> usually many-to-many relationships are handled by a third table, like this:
> 
> create table items (item_id,...)
> create table customers (customer_id, ...)
> create table orders (customer_id, item_id, quantity_orderered)

Hi!  In real life situations, I can only see one possible problem with that.
Let's say you have a product in stock, for a long period of time, and at some
point, you need to change the description of the product... Now what happens
when you look at your old invoices?  They show up with the new description..

What if you need to delete a product? :)
What if the shipping address changes?

I have found, as a requirement in many of my projects, that we be able to view 
invoices/orders /exactly/ like they were..  It involves a different set of
tables, one for the 'open' orders, inventory, etc and another set of tables, 
that are populated for every invoice. (Yes, that means lots of duplication..)

> 
> Hoping it may help
> 
> Patrick JACQUOT
> 
just my 1/50$ CDN
(for what it's worth nowadays...)

Antoine Reid





view thread (7+ messages)

Message-ID: <20000707153223.A22141@inertia.home.kernel-panic.net>
Permalink:  ../20000707153223.A22141@inertia.home.kernel-panic.net/
Also on:    postgresql.org/message-id/20000707153223.A22141@inertia.home.kernel-panic.net

 · 

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-sql@postgresql.org
  Cc: fluke@kernel-panic.net, patrick.jacquot@anpe.fr, john@akadine.com
  Subject: Re: confused by select.
  In-Reply-To: <20000707153223.A22141@inertia.home.kernel-panic.net>
  References: <Pine.BSF.4.21.0007061558550.13354-100000@db.akadine.com> <3965A67C.9D1E6869@anpe.fr> <20000707153223.A22141@inertia.home.kernel-panic.net>

* 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