51 votes 51 votes Which of the following scenarios may lead to an irrecoverable error in a database system? A transaction writes a data item after it is read by an uncommitted transaction A transaction reads a data item after it is read by an uncommitted transaction A transaction reads a data item after it is written by a committed transaction A transaction reads a data item after it is written by an uncommitted transaction Databases gatecse-2003 databases transaction-and-concurrency easy isro2009 + – Kathleen asked Sep 16, 2014 Kathleen 14.8k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply vijju commented Sep 25, 2016 reply Follow Share APPROPIATE ANSWER IS D 0 votes 0 votes Chhotu commented Dec 25, 2017 reply Follow Share A transaction writes a data item after it is read by an uncommitted transaction Blind Write. So commit or not, does not matter. 7 votes 7 votes Sunny Mukherjee commented Jan 19, 2018 reply Follow Share Thanks man :-) You only made the point clear 0 votes 0 votes Please log in or register to add a comment.
Best answer 47 votes 47 votes Here if transaction writing data commits , then transaction which read the data might get phantom tuple/ Unrepeatable error. Though there is no irrecoverable error possible even in this option. This is non issue. Both transaction reading data. This is non issue. This is dirty read. In case if transaction reading uncommitted data commits, irrecoverable error occurs of uncommitted transaction fails. So (D) is answer Akash Kanase answered Nov 21, 2015 • edited Oct 12, 2020 by soujanyareddy13 Akash Kanase comment Share Follow See all 3 Comments See all 3 3 Comments reply aiyyar.aarushi commented Oct 22, 2018 reply Follow Share Can I please know as to why recovery from an unrepeatable read is possible in this scenario but a recovery from a dirty read is not? 2 votes 2 votes shaz commented Dec 3, 2018 reply Follow Share @aiyyar.aarushi I think the reason is that since unrepeatable error is against the isolation property, database will undo the changes that was introduced , using the logs .In case of option (d) it is not that every dirty read leads to unrecoverable schedule, but it "may lead to an irrecoverable error" as the question has asked about "may lead to'' therefore option d is the right one since "if transaction reading uncommitted data commits, before the other transaction that did the write commits, then irrecoverable error occurs if uncommitted transaction fails". 2 votes 2 votes akshaw commented Jan 5, 2023 reply Follow Share @aiyyar.aarushi in option D, if you abort the transaction which performed dirty read (after the other transaction has committed) no issue. If you abort the transaction which performed the write (after the other transaction has committed), you must rollback both transactions to ensure atomicity but if you abort the committed transaction, you would violate durability. 0 votes 0 votes Please log in or register to add a comment.
8 votes 8 votes I hope now it is clear which is the only case where IRRECOVERABILITY ARISES. That is only when a particular transaction reads from a uncommited Transacation and , commits before the commit of the transaction whose data it was reading. shashankrustagi answered Dec 5, 2020 • edited Jan 24, 2023 by JAINchiNMay shashankrustagi comment Share Follow See 1 comment See all 1 1 comment reply Chandrabhan Vishwa 1 commented Feb 13 reply Follow Share how this is phantom read in second image? 0 votes 0 votes Please log in or register to add a comment.
7 votes 7 votes D. If Data is uncommitted , then transactions reads a data after write always give error. rpdhakad answered Jul 20, 2015 rpdhakad comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes D Option C is a normal operation. Option B is also fine as no write operation is involved. Option A can be recovered, but option D can't be. skrahul answered Jan 26, 2015 skrahul comment Share Follow See 1 comment See all 1 1 comment reply amkrj commented May 9, 2015 reply Follow Share after write by uncommited transaction again write is a problem. but after write by uncommited transaction then read why it will be problem? –1 votes –1 votes Please log in or register to add a comment.