Answer to Question #152820 in Databases | SQL | Oracle | MS Access for sai

Question #152820

Let us consider the two concurrent transaction A and B which is accessing the data at the same time. At the point T, the conflict has occurred between the two concurrent transactions. By considering this scenario as example, explain-

a. Write Read conflict

b. Read Write conflict

c. Lost update problem (WW)


1
Expert's answer
2020-12-27T19:32:14-0500

а) Write Read Conflict:

Write read conflict means when the task reads uncommitted data. Suppose in transaction A, some data has been modified, but that isn't yet committed. In the meantime transaction B occurs, where the uncommitted data is read. This is an example of a dirty read. The change which is still uncommitted may be revoked, or some additional changes may take place in that particular object. So, if before the commitment occurs another task reads that object and takes some decision depending on the data it has received, there is a good probability that inconsistency may occur.

в) Read Write Conflict:

Read-write conflict occurs when one task has read some data, and it's not over yet, in the meantime another task (or transaction) may come in and change the data that the previous task read, and commit. Then the first task will have two different versions of the same data, and it will have to abort because it doesn't know what to do with two different versions of the data, 'cause how can it decide which value to choose?

For example, say Tx A has read some object x, but Tx A isn't over yet. In the meantime, Tx B comes in and overwrites the value of the object x. So, Tx A faces the same problem described above.

с) Lost Update problem:

Lost update problem occurs when two interleaving or concurrent transactions update or write the same object almost simultaneously, then the update due to the first transaction is lost. Assume Tx A, has started and it's updating a column in the database. In the mean time, before Tx A has committed the change, Tx B comes in and update the same column. In this case the data from the previous Tx, Tx A is completely lost, and it's simply overwritten by the Transaction B (Tx B). This is Lost update problem.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS