Network-Security
August 31, 2024Transactions
Question 66 |
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.
- T1 start
- T1 B old=1200 new=10000
- T1 M old=0 new=2000
- T1 commit
- T2 start
- T2 B old=10000 new=10500
- 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 redo log record 6 to set B to 10500 | |
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. |
Question 66 Explanation:
→ When the database system crashes after the transactions have committed then we need to redo the log records.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
Correct Answer: B
Question 66 Explanation:
→ When the database system crashes after the transactions have committed then we need to redo the log records.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
Subscribe
Login
0 Comments