In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail the characteristics of database transactions, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The four characteristics of database are atomicity, consistency, separation and persistence.
Atomicity
The atomicity of the transaction means that the program contained in the transaction, as the logical working unit of the database, either performs all the data modifications or does not perform them at all. This property is called atomicity.
The atomicity of a transaction requires that if a transaction can be regarded as a program, it is either executed completely or not at all. That is, the manipulation sequence of the transaction is either completely applied to the database or does not affect the database at all. This property is called atomicity.
If the user completes the update to the database within a transaction, all updates must be visible to the outside world or no updates at all. The former says the transaction has been committed, while the latter says the transaction is undone (or aborted). DBMS must ensure that all manipulation performed by successfully committed transactions is fully reflected in the database, and that failed transactions have no impact on the database at all.
Consistency
Transaction consistency means that the database must be in a consistent state both before and after the execution of a transaction. This feature is called transaction consistency. If the state of the database satisfies all integrity constraints, the database is said to be consistent.
Consistency deals with the protection of all semantic constraints in the database. For example, when the database is in consistency state S1, a transaction is executed on the database, it is assumed that the state of the database is inconsistent during the transaction execution, and when the transaction execution ends, the database is in the consistency state S2.
Separability
Separation means that concurrent transactions are isolated from each other. That is, the operation within a transaction and the data being operated must be blocked from being seen by other transactions that attempt to modify.
Separation is the security guarantee provided by DBMS against conflicts between concurrent transactions. DBMS can provide different levels of separation between concurrently executed transactions by locking. If there is no control over concurrent cross-executed transactions, the execution of multiple concurrent transactions that manipulate the same shared object may cause an exception.
DBMS can provide different levels of separation between transactions that execute concurrently. There is an inverse relationship between the level of separation and the throughput of concurrent transactions. The separability of more transactions may lead to higher conflicts and more transaction abortions. Aborted transactions consume resources, and these resources must be reaccessed. Therefore, ensuring a high separation level of DBMS requires more overhead.
Persistence
Persistence means ensuring that updates to committed transactions are not lost when the system or media fails. That is, once a transaction commits, DBMS guarantees that its changes to the data in the database should be permanent and can withstand any system failure. Therefore, persistence mainly depends on the recovery performance of DBMS. Persistence is guaranteed by database backup and recovery.
What are the characteristics of database transactions to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.