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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Enforced Costraints ??

RE: Enforced Costraints ??

From: Rahul <rahul_at_ratelindo.co.id>
Date: Mon, 11 Jun 2001 21:37:23 -0700
Message-ID: <F001.00324D11.20010611213523@fatcity.com>

Anshuman,

whenever u add a constraint to a table, oracle will make sure all the data (if any)
confirms to the constraint added....

you can enable or disable a constraint (even defer)... dont confuse urself with the term "enforcing a constraint".

Regards
Rahul

> ----------
> From: Anshumn[SMTP:anshumn.sagar_at_wipro.com]
> Sent: Tuesday, June 12, 2001 11:26 AM
> To: LazyDBA.com Discussion
> Subject: Enforced Costraints ??
>
> Hi gurus,
>
> Please help me to know the difference between enabling and enforcing a
> constraint. I need it urgently.
>
> As per my knowledge, enabling a constraint checks for the
> existing data to apply that constraint and then the constraint is
> applied for the forthcoming data. Whereas enforcing a constraint does
> not check the existing records and the constraint is only applied to the
>
> forthcoming data only. Is it correct ?
>
> Suppose I have a 'unique' constraint. If I enforce this constraint, then
>
> for checking the uniqueness criteria, will not it check the existing
> records to determine whether the coming record is unique or not ? If it
> checks for the uniqueness among the forthcoming records only, then I
> have a doubt. In this case I may have loaded a record, with a value
> which is already present in the existing data(Since the existing data
> was not checked while enforcing the constraint). Now if I enable the
> constraint, then that time it will check all the records for uniqueness.
>
> How does it work in that case ? Won't it give me an error ? Then how
> good is the use of an enforced constraint ?
>
> Please give your valuable feedback to clear this doubt. I need it
> urgently.
>
> Thanks in advance,
> Anshumn
>
>
>
> --------
> Oracle documentation is here:
> http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to oracledba-unsubscribe_at_LAZYDBA.com
> To subscribe: send a blank email to oracledba-subscribe_at_LAZYDBA.com
> Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rahul
  INET: rahul_at_ratelindo.co.id

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Jun 11 2001 - 23:37:23 CDT

Original text of this message

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