Describe the contents of each of the following log records and how that record is used (if at all) in rollback and in recovery from crashes and media failure.

a. Abort record
b. Begin record
c. Begin dump record
d. Checkpoint record
e. Commit record
f. Compensation log record
g. Completion record
h. Redo record
i. Savepoint record
j. Undo record

a. When a transaction aborts, it rolls back its updates and then writes an abort record to the log. The abort record contains the transaction’s Id. Using these records, the identity of the transactions active at the time of the crash can be determined by the recovery procedure.

b. To avoid a complete backward scan, when T is initiated a begin record containing its transaction Id is appended to the log. When a transaction is aborted the backward scan for update records can be stopped when T’s begin record is encountered.

c. Before starting a dump, a begin dump record is appended to the log. This is used to locate the checkpoint record at which roll forward during pass 2 of the media recovery procedure must start.

d. The system periodically writes a checkpoint record to the log listing the identities of currently active transactions. The recovery process must (at least) scan backward to the most recent checkpoint record inorder to determine which transactions were active at the time of the crash.

e. When a transaction commits, it writes a commit record to the log. The commit record contains the transaction’s Id. Using these records, the identity of the transactions active at the time of the crash can be determined by the recovery procedure. A
transaction is committed when this record is stored on the (non-volatile) log.

f. Compensation log records are used to record the reversal of updates during abort processing.

g. Indicates, in a deferred update system, that updates in the intentions list of a transaction have been transferred to the database. On recovery, the log update records of incomplete transactions must be used to install their updates in the
database.

h. With physical logging the redo record contains the newvalue of the data item that was updated (the after image). It is used to update the database after a crash.

I. Each time a transaction declares a savepoint, a savepoint record, containing the transaction’s identity and the identity of the savepoint, is written to the log. To roll back to a specific savepoint, the log is scanned backwards to the specified savepoint’s record.

j. With physical logging the undo record contains the old value of the data item that was updated (before image). If the transaction aborts, the undo record is used to restore the item to its original value.

Computer Science & Information Technology

You might also like to view...

The ________ wrapping style permits text to wrap around a graphic frame that surrounds the image

Fill in the blank(s) with correct word

Computer Science & Information Technology

The comb-like artifact in a digital video, as shown in Figure 6.18 , occurs in the _____ video.

Figure 6.18 A digital video frame showing comb-like artifacts.

A. interlaced
B. progressive
C. both A and B

Computer Science & Information Technology