Re: confused by select.

From: Antoine Reid <fluke(at)kernel-panic(dot)net>
To: Patrick Jacquot <patrick(dot)jacquot(at)anpe(dot)fr>
Cc: John <john(at)akadine(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: confused by select.
Date: 2000-07-07 19:32:23
Message-ID: 20000707153223.A22141@inertia.home.kernel-panic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2000-07-07 19:47:10 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Previous Message Bruce Momjian 2000-07-07 18:24:19 Re: Search for underscore w/ LIKE