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: Mark D Powell <Mark.Powell_at_eds.com>
Date: 21 Jun 2006 17:51:19 -0700
Message-ID: <1150937479.418873.295040@m73g2000cwd.googlegroups.com>

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
>

Here is the link
http://groups.google.com/group/comp.databases.oracle.server/browse_frm/thread/84cd3f621a4f2551/b983707623de2011?lnk=st&q=group%3Acomp.databases.oracle.*+insubject%3ACheck+insubject%3AConstraints&rnum=1&hl=en#b983707623de2011

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

Original text of this message

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