Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: General question about CHECK constraints.
Brian Peasland wrote:
> 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
>
If the link does not work look for the subject line "When to use check constraints and when to use small tables? "
HTH -- Mark D Powell -- Received on Wed Jun 21 2006 - 19:51:19 CDT
![]() |
![]() |