Re: confused by select.

Поиск
Список
Период
Сортировка
От Antoine Reid
Тема Re: confused by select.
Дата
Msg-id 20000707153223.A22141@inertia.home.kernel-panic.net
обсуждение исходный текст
Ответ на Re: confused by select.  (Patrick Jacquot <patrick.jacquot@anpe.fr>)
Список 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




В списке pgsql-sql по дате отправления:

Предыдущее
От: "sandis"
Дата:
Сообщение: date comparision
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Altnerate Column Return Names