In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what the ACID features of relational database system transactions are, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
ACID characteristics of transactions in relational database systems: 1. Atomicity; all operations in the transaction are either done or not done. 2. consistency; the database should be in a consistent state all the time. 3. Independence; concurrent transactions will not affect each other. 4. Persistence; once the transaction is committed, its changes will be permanently saved on the database.
Transaction is the core of relational database. The reason why relational database has flourished in the past few decades is closely related to its support for transactions. However, with the explosive growth of data, especially the vigorous development of big data in recent years, the transaction of relational database has become the performance bottleneck of Internet applications. NoSQL just abandons some properties of relational database transactions, which makes its performance many times higher than that of relational database for some special applications.
Let's first talk about what a transaction is. Transaction is transaction in English, which is very similar to real-world transactions. It has the following four features:
1. A (Atomicity) atomicity
Atomicity is easy to understand, that is, all operations in the transaction are either completed or not done. The condition for the success of a transaction is that all operations in the transaction are successful. As long as one operation fails, the whole transaction fails and needs to be rolled back.
For example, a bank transfer of 100 yuan from An account to B account is divided into two steps: 1) withdraw 100 yuan from An account; 2) deposit 100 yuan to B account. These two steps are either completed together or not together. If only the first step is completed and the second step fails, the money will be inexplicably less than 100 yuan.
2. C (Consistency) consistency
Consistency is also easy to understand, that is, the database should be in a consistent state all the time, and the operation of the transaction will not change the original consistency constraints of the database.
For example, the existing integrity constraint a+b=10, if a transaction changes a, then b must be changed so that the transaction still satisfies a+b=10 after the transaction ends, otherwise the transaction fails.
3. I (Isolation) independence
The so-called independence means that concurrent transactions will not affect each other. If the data accessed by one transaction is being modified by another transaction, as long as another transaction is not committed, the data accessed by it will not be affected by the uncommitted transaction.
For example, there is a transaction that transfers 100 yuan from An account to B account. In the case that the transaction has not been completed, if B inquires about his own account at this time, he will not see the new 100 yuan.
4. D (Durability) persistence
Persistence means that once a transaction is committed, its changes will be permanently stored on the database and will not be lost even if there is an outage.
To take the above example, if the transfer is successful and the database is down, you can still see the result of the successful transfer after restart.
These are all the contents of the article "what are the ACID features of transactions in relational database systems". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.