Re: Modeling question...

From: Philipp Post <>
Date: Wed, 9 Jul 2008 01:11:17 -0700 (PDT)
Message-ID: <>


> How does one model relationships in which
- one child table has several parent tables - each parent record can refer to several child records <

I would use relationship tables for them. These will contain the keys of the parent and the child table as foreign key and will compose the primary key of these two columns.

> - each child record belongs to exactly one parent record in exactly one of the several parent tables? <

There, you could insert a column containing the key of the primary table into the child table as a foreign key if you have such a direct relationship.

I would not put all the relations into one table only. You could not not properly enforce foreign key and other constraints there and would create a collection of unrelated things in it what will be hard to manage. Having a lot of relationship tables should basically not be an issue, if they are named consistently and meaningfull.


Philipp Post Received on Wed Jul 09 2008 - 10:11:17 CEST

Original text of this message