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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Implementing 0:1 relationships

Re: Implementing 0:1 relationships

From: Eric Spear <espear_at_glue.umd.edu>
Date: Thu, 21 Oct 1999 20:50:06 -0400
Message-ID: <380FB4BE.E58C649C@glue.umd.edu>


I think option 2 is best.

Martin Trzaskalik wrote:

> Is there a general rule how to implement 0:1 relationships,
> e.g. an entry in TABLE A might but does not have to reference
> an entry in TABLE B.
>
> I am thinking of the following alternatives:
>
> 1.)
> A (A_ID, NAME, B_ID)
> B (B_ID, TEST)
> where A.B_ID might be NULL or a foreign key to B
>
> 2.)
> A (A_ID, NAME)
> B (B_ID, TEST)
> A_B (A_ID, B_ID)
> where A_B.A_ID and A_B.B_ID are foreign keys to A and B.
>
> The application would consist of outer joins involing A and B.
>
> Which alternative is better in aspect of performance etc?
>
> Martin
Received on Thu Oct 21 1999 - 19:50:06 CDT

Original text of this message

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