What is a transaction, and what are the four characteristics of a transaction? What are the isolation levels?

Source: Internet
Author: User

1) Transaction (Transaction): is the smallest unit of work for a database operation, a series of operations performed as a single logical unit of work, which are submitted to the system as a whole, either executed or not executed; a transaction is a set of operations that cannot be re-partitioned (the Working Logic unit);

2) A transaction has 4 properties, often called an acid attribute:

3) atomicity (atomicity): A transaction is a complete operation. The steps of a transaction are non-divided, either executed or not.

4) Consistency (consistency): When the transaction completes, the data must be in a consistent state.

5) Isolation (isolation): All concurrent transactions that modify data are isolated from each other, indicating that the transaction must be independent and that it should not rely on or affect other transactions in any way.

6) Persistence (durability): After a transaction is completed, its modifications to the database are persisted and the transaction log keeps the transaction permanent.

7) Isolation level is divided into: readuncommitted (read UNCOMMITTED), read Committed (read commit), repeatable read (can be read repeatedly), Serializable (serialization) of these 4 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.