Suppose this question is given:
- 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 all transactions undergo undo and redo operations ?
and another question given:
(Start, T4); (write, T4,y,2,3);(Start, T1);( commit,T4);(write, T1,z,5,7);
(checkpoint );
( Start,T2) ; (write, T2,x,1,9) ; (commit,T2) ; (start,T3) , (write,T3,z,7,2)
If a crash happens now and the system tries to recover using both undo and redo operations,
what are the contents of the undo lists and the redo list?
how to solve this type of problems. I'm confused. please help