Isolation level and dirty read phantom read

Source: Internet
Author: User

1.Database OperationsIssue

1.1 update loss (Lost update): An Update loss occurs when two transactions are allowed to update the same data at the same time.

1.2Dirty read (Dirty read): Dirty reads are generated when one transaction reads the changes that have not been committed by another transaction.

1.3Non-repeated read (Nonrepeatable read): The same query is performed multiple times in the same transaction. Because of the modifications or deletions made by other commit firms, different result sets are returned each time, and non-repeated reads occur.(A transaction rereads data it has previusly read and finds that another committed transaction has modified or deleted the data .)

1.4Phantom (Phantom read): The same query is performed multiple times in the same transaction. Because of the insert operations performed by other commit firms, different result sets are returned each time, and phantom reading occurs.(A transaction reexecutes a query returning a set of rows that satisfies a search condition and finds that another committed transaction has inserted additional rows that satisfy the condition .)

 

2.ANSI/ISO sql92Standard isolation level:

2.1Uncommitted read (Read uncommitted)

2.2Submit read (Read committed)

This is the default isolation level for most databases and is supported by most vendors.

2.3Repeated read (Repeatable read) -- Row-Level Lock, cannot write this row

2.4Serialization (Serializable) -- The table is locked and new data cannot be inserted.

 

 

 

 

 

Reference: http://kakaluyi.iteye.com/blog/185473

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.