Re: Designer 2000, use of foreign keys

From: Tim Hall <tim.hall_at_spambuster.com>
Date: 1997/10/03
Message-ID: <343512d4.28407487_at_69.0.9.9>#1/1


[Quoted] On Fri, 3 Oct 1997 15:12:07 +0100, Andy Hardy <Andy_Hardy_at_camk.demon.co.uk> wrote:

>
>I'm still having a little trouble with this - I don't know how to
>determine which of the entities will get the foreign key added to it
>during the conversion to the database schema. I *think* that the entity
>which appears first in the alphabet is given the extra columns during
>the conversion. Surely this can't be right?
>
>Andy
>--

For a one-to-many relationship, the foreign key always goes at the "many" end. It's only one-to-one relationships (which aren't very common anyway) where the key could theoretically go at either end. Off the top of my head, I can't remember the rules for which end it goes but I believe it makes use of any volumetric information.

For an unresolved many-to-many, it will create an intersection table. (I've never seen this happen, since I've always resolved these before I start generating tables).



Tim Hall, Indus International

http://www.tswi.com
http://www.indusgroup.com

Replace "spambuster" with "tswi" before replying via email Received on Fri Oct 03 1997 - 00:00:00 CEST

Original text of this message