In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the three types of data inconsistency caused by concurrent operations in the computer, which can be used for reference. Interested friends can refer to them. I hope you will gain a lot after reading this article. Let's take a look at it.
Data inconsistencies caused by concurrent operations include: loss of modifications, non-repeatable reading, and reading "dirty" data. The reason for these three phenomena is that concurrent operations break the isolation of transactions. In order to deal with these data inconsistencies, the main technologies are: blocking, timestamp, optimistic control method.
What are the data inconsistencies caused by concurrent operations ()
A. lost modification, unrepeatable read, dirty read, deadlock
B. unrepeatable reading, dirty reading, deadlock
C. loss of modifications, dirty reads, deadlocks
D. lost modification, non-repeatable, dirty read
Correct answer: d
Answer analysis:
Transaction is the basic unit of concurrency control, and ensuring the ACID characteristic of transaction is an important task of transaction processing. One of the reasons why transaction ACID characteristic may be destroyed is the concurrent operation of multiple transactions to the database.
The important data inconsistencies caused by concurrent operations are lost modification, non-repeatable reading, and reading "dirty" data.
1. Lost modification
Two transactions T1 and T2 read the same data and modified it, and the result of T2 commit destroyed the result of T1 commit, resulting in the loss of T1 modification. Typical example: the example of buying an air ticket or a train ticket.
2. Non-repeatable
Non-repeatable read means that after transaction T1 reads the data, transaction T2 performs an update operation so that T1 cannot reproduce the result of the previous read.
There are three types of situations:
(1) after transaction T1 reads a certain data, transaction T2 modifies it, and when transaction T1 reads the data again, it gets a different value from the previous one.
(2) after transaction T1 reads a certain data, transaction T2 deletes the records. When transaction T1 reads the data again, it is found that some records have mysteriously disappeared.
(3) after transaction T1 reads some data, transaction T2 inserts some new records, and when transaction T1 reads the data again, some more records are found.
The latter two operations are called phantom phenomena.
3. Read "dirty" data
The only way to read "dirty" data is that transaction T1 modifies a certain data and writes it back to disk. After transaction T2 reads a certain data, T1 undoes the operation and restores the original value for some reason. At this time, the data read by T2 is inconsistent with the data in the database, which is called reading "dirty" data.
The reason for the above three phenomena is that concurrent operations break the isolation of transactions. In order to deal with these data inconsistencies, the main technologies are: blocking, timestamp, optimistic control method.
Thank you for reading this article carefully. I hope the article "which three types of data inconsistencies caused by concurrent operations in computers" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.