Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is this JOIN good ?

Re: Is this JOIN good ?

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 17 Oct 2006 08:17:54 -0700
Message-ID: <1161098270.231717@bubbleator.drizzle.com>


David Portas wrote:
> DA Morgan wrote:

>> If A.FK and B.FK are both lookups to tables holding the same set of
>> values I'd say you have a design flaw.

>
> My interpretation of Charles's post was that he assumed both foreign
> keys were referencing the SAME table, namely table C. I agree that the
> OP didn't make it clear.
>
>> Well that and the fact that you can not write a foreign key to two
>> different tables from the same column.

>
> Why not? Are you referring to some limitation of Oracle or is that just
> your recommendation?

My error. Typed before thinking. Oracle does allow it.

But it is a bad design as it forces the columns in table a and b to contain identical information and thus they would be redundant. Remember to comply with 3NF "all non-key fields are dependent on the primary key" and surely the primary keys in tables a and b are not identical.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Oct 17 2006 - 10:17:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US