Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: General question about CHECK constraints.
Paul wrote:
>
> Hi all,
>
>
> This is a general db design question that I have been pondering for a
> while.
>
>
> If you have a field that is going to have a definite known number of
> values in advance i.e.
>
> Gender(M, F, U), it's better to use a check constraint than have a
> gender table obviously.
>
>
> My question is at what point does it become "better" to have a foreign
> key and not use a check constraint.
>
>
> Month(Jan, Feb... Dec)?
>
> LettersInAlphabet(A, B, C....Z)?
>
> CountryCodes(AU, AS.... ZM)?
>
> DayOfYear(1,2,3.... 366)?
>
> WordsInSmallDictionary(Aardvark,..... Zygote)? Say 5000 entries?
>
>
> TIA.
>
>
>
> Paul...
>
>
Please search the archives at http://groups.google.com as this same exact topic was discussed less than a month ago.
Thanks,
Brian
-- =================================================================== Brian Peasland oracle_dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Wed Jun 21 2006 - 17:41:17 CDT
![]() |
![]() |