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

Home -> Community -> Usenet -> c.d.o.server -> Re: General question about CHECK constraints.

Re: General question about CHECK constraints.

From: Brian Peasland <oracle_dba_at_nospam.peasland.net>
Date: Wed, 21 Jun 2006 22:41:17 GMT
Message-ID: <J18F0v.Crq@igsrsparc2.er.usgs.gov>


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" - Unknown
Received on Wed Jun 21 2006 - 17:41:17 CDT

Original text of this message

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