Oracle data concurrency and consistency Protection

Source: Internet
Author: User

Data concurrency means that many users can access data at the same time. Data Consistency means that the data seen by each user is consistent, including the changes made to data by the current user transaction and other user transactions. Data concurrency and consistency protection are three possible phenomena in the case of parallel transactions: Dirty read (dirty read): transactions read modifications that have not been committed by other transactions; nonrepeatable read: when a transaction reads data that has previously been read, it finds that other committed transactions modify or delete the data to be read. Phantom read ): the transaction executes a query again and finds that other committed transactions have inserted new data that meets the current query conditions. For the above three phenomena, the sql92 Standard specifies four isolation systems, one of which is stricter than the other. Read uncommitted: dirty reads, non-repeated reads, and Phantom reads are allowed; read committed: dirty reads are not allowed; Repeatable read: dirty reads, non-repeated reads, and Phantom reads are not allowed; serializable: dirty reads, non-repeated reads, and Phantom reads are not allowed. Oracle provides read committed and serializable isolation levels, and an additional read-only mode. The read committed mode is used by default. Read committed provides statement-level read consistency, and serializable provides transaction-level read consistency. Under the Read committed level, non-repeated and hypothetical reads may still occur. Not at the serializable level. Essence of the isolation level: When Oracle starts a query, it only reads records whose SCN is smaller than the currently queried SCN. If it is found that the SCN record in the data file is larger than the queried SCN, oracle will find the image before the data query occurs from the rollback segment. In addition to the isolation level, Oracle also provides locks for data concurrency and consistency protection, but it generally does not need to be understood.

 

Related Article

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.