Assume two concurrent transactions:

   Tx 1                                                Tx 2

1. SELECT COUNT(*) FROM customers
2.                                                     DELETE FROM
customers WHERE id=1
3.                                                     COMMIT
4. SELECT COUNT(*) FROM customers

Let's assume that initially there are 3 records in customers with ids
1,2 and 3.

For read-committed:

Step (1) Returns 3.
Step (4) Returns 2.

For repeatable-read:

Step (1) Returns 3.
Step (4) Returns 3.


There's a book called 'Principles of Transaction Processing' that will
answer this and many more important TP subjects in detail.

HTH,

Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[EMAIL PROTECTED]

Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050  Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]] On Behalf Of Milind Kulkarni
> Sent: Monday, October 14, 2002 5:53 AM
> To: [EMAIL PROTECTED]
> Subject: Transaction Isolation Levels
>
>
> Hi All,
>
>       Can anyone explain me the difference between
> transaction isolation
>       levels ' ReadCommitted' and 'RepeatableRead':
>
>       It appears to be the same:
>
>      ReadCommitted: Only data that have been committed by a
> transaction can
>      be read by other transactions.
>      RepeatableRead: Only data that have been committed by a
> transaction
>      can be read by other transactions, and multiple reads
> will yield the
>      same result as long as the data have not been committed.
>
>    Thanks,
>    Milind
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "signoff EJB-INTEREST".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to