| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Implementing 0:1 relationships
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
![]() |
![]() |