retagged by
1,080 views
0 votes
0 votes

​​​​​​​Consider the following sequence of two transactions on a bank account $(A)$ with initial balance $20,000$ that transfers $5,000$ to another account $(B)$ and then apply $10 \%$ interest.

  1. T1 start
  2. T1 A old=$20,000$ new $15,000$
  3. T1 B old = $12,000$ new = $17,000$
  4. T1 commit
  5. T2 start
  6. T2 A old = $15,000$ new = $16,500$
  7. T2 commit

Suppose the database system crashes just before log record (vii) is written. When the system is restarted, which one statement is true of the recovery process?

  1. We must redo log record (vi) to set $A$ to $16,500$
  2. We must redo log record (vi) to set $A$ to $16,500$ and then redo log records (ii) and (iii)
  3. We need not redo log records (ii) and (iii) because transaction $T1$ is committed
  4. We can apply redo and undo operations in arbitrary order because they are idempotent
retagged by

1 Answer

0 votes
0 votes

As, there are no checkpoints. So, we will redo all the committed transactions and redo all the uncommitted transactions.

So, we will redo log record $(vi)$ and then redo log records $(ii)$ and $(iii)$

So, $(B)$ should be the answer.

Correct me if I'm wrong

For reference see here

Related questions

0 votes
0 votes
1 answer
3
Arjun asked Jan 2, 2019
625 views
​​​​​​​A clustering index is defined on the fields which are of typenon-key and orderingnon-key and non-orderingkey and orderingkey and non-ordering