77 77 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 21.3k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments Sunny Mukherjee commented Jan 19, 2018 reply Follow flag Thanks man :-) You only made the point clear 0 0 replyShare Raj_Dev_Verma commented Aug 11 reply Follow flag Option D is Correct 0 0 replyShare panipuri commented Sep 6 reply Follow flag $$\underline{\text{Analogy}}$$Imagine you and your friend are writing an exam, and your friend cheats by copying your answer and submits the answer sheet before you submit yours; later you realize that you made some mistakes.You can make the appropriate changes, but your friend can't. The damage your friend has incurred is irrecoverable. 1 1 replyShare Please log in or register to add a comment.
Best answer 63 63 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 3 3 Comments reply aiyyar.aarushi commented Oct 22, 2018 reply Follow flag 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 2 replyShare shaz commented Dec 3, 2018 reply Follow flag @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 2 replyShare akshaw commented Jan 5, 2023 reply Follow flag @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. 1 1 replyShare Please log in or register to add a comment.
17 17 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 1 1 comment reply Chandrabhan Vishwa 1 commented Feb 13, 2024 reply Follow flag how this is phantom read in second image? 1 1 replyShare Please log in or register to add a comment.
8 8 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 0 reply Please log in or register to add a comment.
4 4 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 1 1 comment reply amkrj commented May 9, 2015 reply Follow flag after write by uncommited transaction again write is a problem. but after write by uncommited transaction then read why it will be problem? –1 –1 replyShare Please log in or register to add a comment.
1 1 vote A transaction is reading a data item after it is written by an uncommitted transaction, the schedule will be irrecoverable. This is irrecoverable Schedule because T2 reads a updated value before the commit operation of T1. ManojK answered May 30, 2016 ManojK comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote BEST ANSWER akshay_123 answered Jul 5, 2025 akshay_123 comment Share Follow 0 reply Please log in or register to add a comment.