in GATE retagged by
1,311 views
1 vote
1 vote

Assume there are n transactions  $T^{1}$., $T^{2}$., .... ,$T^{n}$.

Every transaction Writes a value  of variable $X$  and then it is read by its successive transaction, like, $T^{1}$ writes a value of $X$ that is read by $T^{2}$ 

$T^{2}$  writes a value of X that is read by $T^{3}$

$T_{n-1}$writes a value of X that is read by $T^{n}$     

Now, if $T_1$ fails then total number of transaction rollbacks are required to recover the schedule is ?

  1. $0$
  2. $\left ( n \right )$
  3. $1$
  4. $\left ( n-1 \right )$
in GATE retagged by
by
1.3k views

1 comment

0
0

1 Answer

1 vote
1 vote
Best answer

Here  cascading rollback is occured between transactions .

So total number of transaction rollbacks are required to recover the schedule is  n .

Answer is   n .

Which is option B .

selected by

4 Comments

Oops...Thanks .
0
0
@Bikram sir didn’t get it , why it should be n and not (n-1).

When T1 fails then T2,T3….Tn . All these transactions need to be rolled back.

So these are n-1 transactions.

Are  we also including T1 transaction in  no. of roll back transactions?
0
0

@wander

ROLLBACK is a command that causes all data changes since the last BEGIN WORK, or START TRANSACTION to be discarded by the relational database management systems (RDBMS), so that the state of the data is "rolled back" to the way it was before those changes were made.

 

https://en.wikipedia.org/wiki/Rollback_(data_management)#Cascading_rollback

 

0
0
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

64.3k questions

77.9k answers

244k comments

80.0k users