The minimum requirement for active attendance: 3 tasks done
1. What kind of an operation sequence is included in a typical online banking terminal transaction (a cash withdrawal)? We assume that the card's verification code is checked locally (without a database) but the accounts are managed by a database. Which exceptions there can happen (concerning the transaction management)? 2. Assume that the following records are found in the log file when the system crashes: 100: [start, T1] 101: [start, T2] 102: [write, T1, A, 10, 20] 103: [write, T2, B, 11, 22] 104: [commit, T1] 105: [start, T3] 106: [write, T3, A, 20, 30] 107: [abort, T2] 108: [checkpoint] 109: [start, T4] 110: [write, T3, B, 11, 33] 111: [write, T3, A, 30, 40] 112: [write, T4, C, 15, 25] 113: [commit, T3] 114: [write, T4, C, 25, 35] a) What recovery operations are needed? We assume that the PageLSN (page log sequence number) field of the page containing data item A is 106, the PageLSN for B is 110 and the PageLSN for C is 112. b) Let us assume that no checkpoint record (# 108) has been written. In what phase of the log sequence the number of recovery operations needed is largest? 3. What are the advantages of write-ahead logging (WAL) protocol in buffering ? Is this protocol necessary? 4. Why are all undos performed in backward order, and all redos in forward order, from the log? Give a concrete example describing the significance of the backward/forward order. 5. Assume that when the database management system is recovering from a failure (that is, performing undo or redo operations), a new failure occurs before the recovery from the old one is complete. How is this situation handled? Should one also record undos and redos in the log, so that these could be "undone" or "redone"? 6. What kind of a commit protocol should be used were it required that no redos be necessary in recovery? What drawbacks there are with this scheme?