Database acid principles and transaction isolation levels

Source: Internet
Author: User

Database acid Principles

A: Atomicity, atomicity

C: Consistency, consistency

I: Isolation, isolation

D: Persistent, durability

In MySQL InnoDB engine, atomicity, consistency, isolation through redo and undo implementation, Redo is ib_logfile physical files, and undo by default in the shared Tablespace ibdata, by setting parameters can be independent.


Transaction ISOLATION LEVEL

READ UNCOMMITTED the disadvantage of allowing dirty reads, not allowing simultaneous write operations, but allowing other transactions to read UNCOMMITTED data

Read Committed, the disadvantage is that it allows for Phantom reads (data that has not previously existed but has been submitted later), does not allow simultaneous write operations, allows only read committed data, but allows non-repeatable reads (two read data allow inconsistencies), The default isolation level for Oracle and SQL Server.

REPEATABLE READ (repeatable read), prohibit non-repeatable reads and dirty reads, in extreme cases there will be phantom read, overall acid-compliant, MySQL default isolation level.Serializable (serialization), the disadvantage is poor concurrency, the most stringent transaction isolation, fully comply with the acid principle,

Database acid principles and transaction isolation levels

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.