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: Difference: Uniq. Constraint & Index ?

Re: Difference: Uniq. Constraint & Index ?

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Wed, 18 Oct 2006 17:55:45 GMT
Message-ID: <J7CF50.606@igsrsparc2.er.usgs.gov>


> The basis for my question was that I've frequently read the rule of
> thumb "if it is a business constraint, use a DB constraint for
> enforcement - otherwise use an index". This seems a bit conflicting
> with your general preference of constraints. Or do you think this rule
> of thumb to be wrong?

Even assuming that the above is correct, if it is not a business rule, then why are we using a unique index? The fact that the column(s) should be unique *is* a business rule. Can you provide an example of a column(s) being unique that is not defined by a business rule? I can't.

HTH,
Brian

-- 
===================================================================

Brian Peasland
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 Oct 18 2006 - 12:55:45 CDT

Original text of this message

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