chetana bhargav <[EMAIL PROTECTED]> wrote:
> Hi,
>    
>   I have a query regarding transactions and tables.
>    
>   Say in a DB if you have 4 tables, now in my code  I will say , "begin 
> transaction" and start modifying a table, say tbl1, now a journal would be 
> backed up for the tbl1 that I am going to modify, now if in the same 
> transaction if I try to modify a different table, say tbl2,  in the same DB, 
> will the multiple inserts into the tbl2 will be fast as we have already a 
> journal created. 

Yes.

>    
>   If at this point the power goes off, will tbl2 be consistent?

Yes.  All updates are atomic.  Either both tbl1 and tbl2
will be updated or neither will.

>    
>   And one more question,
>   If in my code if I call "begin transaction" on the same DB twice due to 
> some logical flow error, will it have any effect.
>    

You will get an error on the second "begin transaction" but if
you just ignore that error you can continue normally and nothing
bad will come of it.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to