written 7.7 years ago by | modified 2.6 years ago by |
Mumbai University > Information Technology > Sem 3 > Database Management System
Marks: 10M
Year: Dec 2013
written 7.7 years ago by | modified 2.6 years ago by |
Mumbai University > Information Technology > Sem 3 > Database Management System
Marks: 10M
Year: Dec 2013
written 7.7 years ago by | • modified 7.7 years ago |
Log Based Recovery
There are several types of log records.
New value
Whenever a transaction performs a write, it is essential that the log record for that write be created before the database is modified.
Log based recovery works as follows:
<tn, start=""> - When the transaction modifies an item X, it write logs as follows: <tn, x,="" v1,="" v2="">
It reads Tn has changed the value of X, from V1 to V2.
<tn,commit>
Database can be modified using two approaches:
Deferred database modification: All logs are written on to the stable storage and database is updated when transaction commits.
Immediate database modification: Each log follows an actual database modification.
That is, database is modified immediately after every operation.