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: Assertions Dilemma Revisted

Re: Assertions Dilemma Revisted

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Sun, 28 Apr 2002 16:50:01 GMT
Message-ID: <ZKVy8.153443$G72.86293@sccrnsc01>

"Sted Alana" <Sted_Alana_at_hotmail.com> wrote in message news:3ccc1156_1_at_news.iprimus.com.au...
> >Jonathan Gennick wrote:
> > An immediate constraint is one that is checked immediately after a
> statement executes.
>
> Do you mean after a SQL statement for example? or when you define a table?
>
>
> >A deferred constraint is one that is not checked until you commit your
> transaction.
>
> Dont understand the term 'commit your transaction'.
In RDBM's operations are atomic and happen within a transaction. So if you issue a commit statement then you have ended your transaction and then the deferred constraint is checked. A transaction is so you can issue a series of statements and have all the statements succeed or fail - no halfway state. Some databases require you to explicityly start a transaction (begin trans) or every sql statement is committed. In Oracle an explicit commit or rollback ends a transaction and marks the begining of the next one. (An important technical detail here is that DDL implicitly issues a comit statement - you can't rollback a create table statement for example.)

>
>
> >A deferred foreign-key constraint, for example, will allow you to insert
> child >rows first and the parent row last, and everything will be ok as
long
> as you have it all straight when you commit.
>
> Ok. This sounds like disabling a contraint and enabling it again when the
> tables have been created.
>
>
> > I don't understand the second part of your question.
>
> The book I am currently reading makes note of assertions with partial
> rollback and rollback.
>
>

Probably talking about save points.
>
>
> --
> N e w s N e t C u s t o m e r
> E - m a i l : sted.alana_at_hotmail.com
>
>
>
>
>
>
Received on Sun Apr 28 2002 - 11:50:01 CDT

Original text of this message

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