Locks, Logging & Recovery
This covers tutorial 4.
Add links to answers to this tutorial.
Locks
See the answers for tutorial 4 for this question.
Logging & Recovery
- Recovery with undo-logging:
    
- Change the value of $X$ on disk back to 10 and call abort for $T_1$ and $T_2$.
 - Change:
        
- $Z=30$
 - $X=10$
 
on disk and call abort for $T_1$.
 - 
        
Same as 2 but also change:
- $V=50$
 
 - No change all transactions completed successfully.
 
 - Values on disk:
    
- $X$ might be on disk.
 - All values from $T_2$ must be on disk and $X$ and $Z$ might be on disk from $T_1$.
 - All values from $T_2$ must be on disk and $X$, $V$ and $Z$ might be on disk from $T_1$.
 - All values must be on disk.
 
 - For the schedules in the tutorial:
    
- The following transactions need to be rolled back:
        
- $S_1$ - $T_3$
 - $S_2$ - $T_2$
 - $S_3$ - None
 - $S_4$ - $T_3$
 
You should roll back any transactions with dirty reads. You should also roll back any other transaction that reads a write created by a transaction that has had a dirty read.
Dirty reads are where a transaction is allowed to read a row that has been modified by an another transaction which is not committed yet.
 - This question is tedious due to the number of combinations. See the answers.
 
 - The following transactions need to be rolled back: