Beta Phase: Square45 is currently in beta testing. Expect some features or content to be incomplete or missing.
45

Recovery Manager

Software component responsible for restoring the database to a consistent state after a failure, using transaction logs.
📜

The statement of the theorem

Let DD be the initial database state and LL be the transaction log. The Recovery Manager R\mathcal{R} defines a state transition function R:(D,L)D\mathcal{R}: (D, L) \to D' such that DD' is the consistent state. The recovery process involves two phases: Redo and Undo. For any operation TID,<UPDATE>,d,Old,NewL\langle \text{TID}, \text{<UPDATE>}, d, \text{Old}, \text{New} \rangle \in L, the Redo operation Redo(d,New)\text{Redo}(d, \text{New}) applies New\text{New} to dd if the transaction TID\text{TID} committed, and the Undo operation Undo(d,Old)\text{Undo}(d, \text{Old}) reverts dd to Old\text{Old} if the transaction TID\text{TID} aborted or failed before committing. The final state DD' must satisfy the ACID properties based on the surviving committed transactions.