Re: N all-way relationship - Mailing list pgsql-sql

From chester c young
Subject Re: N all-way relationship
Date
Msg-id 20030513163316.11749.qmail@web12708.mail.yahoo.com
Whole thread Raw
In response to N all-way relationship  ("Ryan" <pgsql-sql@seahat.com>)
List pgsql-sql
--- Ryan <pgsql-sql@seahat.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



pgsql-sql by date:

Previous
From: Adam Sherman
Date:
Subject: Locating all Children given Set of Parents
Next
From: "Joachim Zauner"
Date:
Subject: See Temp Table from Trigger