Skip site navigation (1) Skip section navigation (2)

Re: Multiway associations

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Russell Shaw <rjshaw(at)iprimus(dot)com(dot)au>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Multiway associations
Date: 2004-01-25 05:05:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi Russel

On Jan 25, 2004, at 12:46 PM, Russell Shaw wrote:
> I have a list of parts, each of which is sold by multiple
> vendors. I also have a list of vendors, each of which sell
> multiple parts.
> How should i arrange the tables for this that doesn't involve
> having lots of empty fields "just in case" ?

One common way to do this is to have three tables: one suppliers, one 
parts, and one suppliers-parts referencing suppliers and parts.

Does that help?

Michael Glaesemann
grzm myrealbox com

In response to


pgsql-novice by date

Next:From: Bruce MomjianDate: 2004-01-25 05:19:27
Subject: Re: Problem with pg_hba.conf file in Postgres 7.3
Previous:From: Russell ShawDate: 2004-01-25 03:46:13
Subject: Multiway associations

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group