程序代写代做 algorithm database CS W186 Introduction to Database Systems

CS W186 Introduction to Database Systems
Spring 2020 Josh Hug, Michael Ball DIS 11
1 Recovery Q1
Consider the execution of the ARIES recovery algorithm given the following log (assume a check- point is completed before LSN 0 and the Dirty Page Table and Transaction Table for that check- point are empty):
(a) During Analysis, what log records are read? What are the contents of the transaction table and the dirty page table at the end of the analysis stage?
(b) During Redo, what log records are read? What data pages are read? What operations are redone (assuming no updates made it out to disk before the crash)?
(c) During Undo, what log records are read? What operations are undone? Show any new log records that are written for CLR¡¯s. Start at LSN 100. Be sure to show the undoNextLSN.
CS W186, Spring 2020, DIS 11 1

2 Recovery Q2
Your database server has just crashed due to a power outage. You boot it up, find the following log and checkpoint information on disk, and begin the recovery process. Assume we use a STEAL/NO FORCE recovery policy.
(a) The log record at LSN 60 says that transaction 2 updated page 5. Was this update to page 5 successfully written to disk? The log record at LSN 70 says that transaction 1 updated page 2. Was this update to page 2 successfully written to disk?
(b) At the end of the analysis phase, what transactions will be in the transaction table, and what pages will be in the dirty page table?
(c) At which LSN in the log should redo begin? Which log records will be redone (list their LSNs)? All other log records will be skipped.
CS W186, Spring 2020, DIS 11 2