Four features of database transactions and four features of transactions

Source: Internet
Author: User

Four features of database transactions and four features of transactions

Four features of the database are atomicity, consistency, separation, and persistence. Next let's take a look at the specific introduction.

Atomicity

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 any modification to the data is either performed in full or not at all. This feature is called atomicity.

The atomicity requirement of a transaction. If a transaction can be considered as a program, it is either completely executed or completely not 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 feature is called atomicity.

If the user completes the database update in a transaction, all the 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 (or aborted ). DBMS must ensure that all the Operations completed by successfully committed transactions are fully reflected in the database, and the failed transactions have no impact on the database.

Consistency

Transaction consistency means that the database must be consistent 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. For example, when the database is in the consistent status S1, execute a transaction on the database. During the transaction execution, assume that the database status is inconsistent. When the transaction execution ends, the database is in the consistent state S2.

Separation

Separation 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 not seen by other transactions that attempt to modify the data.

Separation is the security guarantee provided by DBMS for conflicts between concurrent transactions. DBMS can provide different levels of separation between concurrent transactions through locking. If the transaction with concurrent cross-execution is not controlled, 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 data in the database should be permanent and can withstand any system faults. Therefore, durability mainly lies in the restoration performance of DBMS. Durability is ensured through database backup and recovery.

Summary

The above is all about the four features of the database in this article, and I hope to help you. For more information about oracle Database Import and Export commands, differences between oracle rac and distributed databases, and oracle Database startup analysis, you are welcome to leave a message saying that the editor will reply to you in time and make modifications to provide a better reading experience and high-quality articles for reference by programmers.

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.