Atomicity, consistency, isolation, and durability of transactions

Source: Internet
Author: User

Atomicity of transactions
The atomicity of a transaction refers to the fact that the program contained in the transaction acts as the logical unit of work of the database, and all the data modification operations it does must be performed, or none of them will be executed. This feature is called atomicity. The atomicity requirement of a transaction. If a transaction is regarded as a program, it is either fully executed or fully executed. That is to say, the transaction operation sequence can be fully applied to the database or does not affect the database at all. This kind of feature is called atomicity. If a user completes database update in a transaction, all updates must be visible to the external world or have not been updated at all. The former indicates that the transaction has been committed, and the latter indicates that the transaction has been canceled. DBMS must ensure that all operations completed by successfully committed transactions are fully reflected in the database, and the failed transactions have no impact on the database.

 

Transaction consistency
The database must be in a consistent state before and after a transaction is executed. This feature is called transaction consistency. If the database status meets all integrity constraints, the database is consistent.
The consistency processing database protects all semantic constraints. If the database status meets all integrity constraints, the database is consistent. For example, when the database is in the consistent status S1, execute
Transactions. During the transaction execution, it is assumed that the database status is inconsistent. When the transaction execution ends, the database is in the consistent state S2.

 

Isolation
Isolation refers to the isolation of concurrent transactions. That is to say, the operations inside a transaction and the data being operated must be blocked, and the separation of transactions that are not attempted to be modified is the security guarantee provided by DBMS for conflicts between concurrent transactions. DBMS can provide different levels of separation between concurrent transactions through locking. Assume that there is no control over the concurrent cross-execution transactions. The execution of multiple concurrent transactions that manipulate the same shared object may cause exceptions.
DBMS can provide different levels of separation between concurrent transactions. There is an inverse relationship between the separated level and the throughput of concurrent transactions. A large number of transactions may cause high conflicts and a large number of transaction misoperations. Aborted transactions consume resources, which must be re-accessed. Therefore, ensure that DBMS at the high isolation level requires more overhead.

 

Durability
Durability means that when the system or media fails, the updates of committed transactions cannot be lost. That is, once a transaction is committed, the DBMS ensures that its changes to the database data should be permanent and can withstand any system faults.
. Durability is ensured through database backup and recovery. This means that when the system or media fails, the updates of committed transactions cannot be lost. That is, update recovery for committed transactions. Once a transaction is committed, DBMS must ensure proper redundancy so that it can withstand system faults. Therefore, durability mainly lies in the restoration performance of DBMS.

Atomicity, consistency, isolation, and durability of transactions

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.