X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1DFAA47636B for ; Tue, 13 May 2003 12:33:13 -0400 (EDT) Received: from web12708.mail.yahoo.com (web12708.mail.yahoo.com [216.136.173.245]) by postgresql.org (Postfix) with SMTP id 21902474E42 for ; Tue, 13 May 2003 12:33:12 -0400 (EDT) Message-ID: <20030513163316.11749.qmail@web12708.mail.yahoo.com> Received: from [68.35.166.87] by web12708.mail.yahoo.com via HTTP; Tue, 13 May 2003 09:33:16 PDT Date: Tue, 13 May 2003 09:33:16 -0700 (PDT) From: chester c young Subject: Re: N all-way relationship To: Ryan Cc: sql pgsql In-Reply-To: <11523.65.102.128.233.1052835391.squirrel@fordparts.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, hits=-14.3 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,RCVD_IN_RFCI autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/229 X-Sequence-Number: 13394 --- Ryan 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