The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+26 votes
3.2k views

Which of the following scenarios may lead to an irrecoverable error in a database system?

  1. A transaction writes a data item after it is read by an uncommitted transaction
  2. A transaction reads a data item after it is read by an uncommitted transaction
  3. A transaction reads a data item after it is written by a committed transaction
  4. A transaction reads a data item after it is written by an uncommitted transaction
asked in Databases by Veteran (59.7k points) | 3.2k views
0
APPROPIATE ANSWER IS D
+2
  1. A transaction writes a data item after it is read by an uncommitted transaction 

 Blind Write. So commit or not, does not matter.

0
Thanks man :-)

You only made the point clear

3 Answers

+28 votes
Best answer
  1. 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.
  2. This is non issue. Both transaction reading data.
  3. This is non issue.
  4. This is dirty read. In case if transaction reading uncommitted data commits, irrecoverable error occurs of uncommitted transaction fails. So (D) is answer




 

answered by Boss (43.2k points)
edited by
0
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?
0

@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".

+7 votes
D. If Data is uncommitted , then transactions reads a data after write always give error.
answered by Active (1.6k points)
+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.
answered by Junior (697 points)
–1
after write by uncommited transaction again write is a problem.

but after write by uncommited transaction then read why it will be problem?
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

44,284 questions
49,773 answers
164,284 comments
65,856 users