CS4482tut7a - to 2. 3. (a) Undo operation is no longer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS4482/6492 Advanced Database Systems Tutorial 7 1. o Suppose the system crashes after the transaction commits, but before its log records are flushed to stable storage. o Assume that at the time of the crash the update of A in the third step alone had actually been propagated to disk whereas the buffer page containing B was not yet written to disk. o When the system comes up, it is in an inconsistent state, but recovery is not possible because there are no log records corresponding to this transaction in stable storage. 2. o Suppose a data item is updated more than once, say from 1 to 2, and then from 2 to 3. o If the undo log records are processed in forward order, the final value of the data item would be incorrectly set to 2, whereas by processing them in reverse order, the value is set to 1. o If redo processing processes the records in forward order, the final value is set correctly to 3, but if done in reverse order, the final value would be set incorrectly
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: to 2. 3. (a) Undo operation is no longer needed because the database (disk) does not reflect updates due to any uncommitted transaction. In other words, if a transaction was active when the system crashed, the values in the disk have not been modified by the transaction. (b) There is the potential for running out of buffer space because updates must be held in the buffers until the transaction commits. 4. (a) Redo operation is no longer needed because if a log record < T commit> is found in the log during recovery, all changes made by T were previously written to disk. Thus, T by itself could not have left the database in an inconsistent state when the failure occurred. (b) o The commit of transactions might be slowed down as it forces all modified blocks to be flushed to disk before commit. o It may incur more output operations because frequently updated blocks are output multiple times, once for each transaction....
View Full Document

This note was uploaded on 01/11/2012 for the course CS CS4482 taught by Professor Drlee during the Winter '11 term at City University of Hong Kong.

Ask a homework question - tutors are online