From: | chester c young <chestercyoung(at)yahoo(dot)com> |
---|---|
To: | Ryan <pgsql-sql(at)seahat(dot)com> |
Cc: | sql pgsql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: N all-way relationship |
Date: | 2003-05-13 16:33:16 |
Message-ID: | 20030513163316.11749.qmail@web12708.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
--- Ryan <pgsql-sql(at)seahat(dot)com> wrote:
> This is largely related to cross referencing part numbers
Why not
table master_part(
part_id int primary key,
part_no not null unique,
... );
table vendor( vendor_no primary key, ... );
table vendor_part(
part_id int primary key default(seq),
vendor_no references vendor,
master_part references master_part( part_id ),
vendor_part,
constraint unique( vendor_no, vendor_part ),
... );
Everything here is nice and normal (use part_id to avoid compound
primary keys). Then use views for all cross referencing.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Joachim Zauner | 2003-05-13 16:34:42 | See Temp Table from Trigger |
Previous Message | Adam Sherman | 2003-05-13 16:19:42 | Locating all Children given Set of Parents |