Data Base Management System #1

Computer Science Level pending

Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then apply a 5% interest.

  1. T1 start
  2. T1 B old=12000 new=10000
  3. T1 M old=0 new=2000
  4. T1 commit
  5. T2 start
  6. T2 B old=10000 new=10500
  7. T2 commit

Suppose the database system crashes just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?

We must undo log record 6 to set B to 10000 and then redo log records 2 and 3 We need not redo log records 2 and 3 because transaction T1 has committed We can apply redo and undo operations in arbitrary order because they are idempotent. We must redo log record 6 to set B to 10500

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Once a transaction is committed, no need to redo or undo operations Once a transaction is committed, no need to redo or undo operations Once a transaction is committed, no need to redo or undo operations

But what about transaction T2 which was not commited?

Hasmik Garyaka - 3 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...