| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Nulls in Foregn Key Column in Table
Shlomo Rasnier wrote:
>
> Hi all,
>
> We are considering putting Null value in Foregn key in a table.
>
> Is it desirable or should We avoid it using instead default value ?
> Please consider performance in your answer.
>
> Those FK column should also be in Indexed.
>
> Thanks
> Shlomo
> email Rasnier_at_wiztec.co.il
If you mean one column in composite key, I think null is better. Each key including default values must refer to existing row with equal value as primary key, says foreign key constraint. If there in no "natural", real default value, this would add complexity to your design, and so on. But if your application suggests a default that has useful meaning, why not.
Regards,
Timo
-- "To no one will we sell, to no one deny or delay right or justice." (Magna Carta 1215) "... still valid ... but with a few minor amendments." (The British Library Board 1976)Received on Wed Nov 20 1996 - 00:00:00 CST
![]() |
![]() |