Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Database Design - Tricky
If I have well understood your issue:
Actually you can do this without the intersection table by adding the
NEWSKEY in the C, R, B table as a foreign key. So if you want to add a new
table at R,B,C level, you do not need to change anything in the SQL
accessing the existing tables, and you do not need to create any extra
table.
But this needs to amend the R,B,C existing tables.
Jacques Desmazieres
"Van Messner" <vmessnerNOvmSPAM_at_discovernet.com.invalid> wrote in message
news:279730c0.91eee10f_at_usw-ex0106-046.remarq.com...
> Imagine three tables C, R and B. C has a primary key of CKEY, R
> is RKEY and B is BKEY.
>
> Another table NEWS has a primary key of NEWSKEY.
>
> C, R and B can all be associated with zero to many NEWS items.
> Any NEWS item can be associated with C and/or R and/or B.
>
> One model is to put an intersection table between NEWS and C,
> NEWS and B, and NEWS and R.
>
> But when I add more tables at the level of C, R and B then I will
> need more intersection tables. Is there a more elegant solution?
> Please be specific about which would be the key and foreign key
> columns of any alternative solution.
>
> Many thanks,
>
> Van
>
>
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Fri Jul 21 2000 - 00:00:00 CDT