Modern Database Management: Chapter 11 Problem and Exercise 2

modern-database-management-chapter-11-problem-and-exercise-2

Five recovery techniques are listed below. For each situation described, decide which of the following recovery techniques is most appropriate.
  • Backward recovery
  • Forward recovery (from the latest checkpoint)
  • Forward recovery (using a backup copy of the database)
  • Reprocessing transactions
  • Switch
a. A phone disconnection occurs while a user is entering a transaction.
b. A disk drive fails during regular operations.
c. A lightning storm causes a power failure.
d. An incorrect amount is entered and posted for a student tuition payment. The error is not discovered for several weeks.
e. Data entry clerks have entered transactions for two hours after a full database backup when the database becomes corrupted. It is discovered that the journalizing facility of the database has not been activated since the backup was made.

The solution to the problem

Recovery techniques

Database recovery is the process of gaining the lost data in the database. In a database, the data might be lost or damaged because of some failures. The database administrator has the responsibility to recover the lost data from the database backup. There are five recovery techniques. They're as follows:
  • Backward recovery
  • Forward recovery (from the latest checkpoint)
  • Forward recovery (using a backup copy of the database)
  • Reprocessing transactions
  • Switch

Appropriate recovery techniques for given situations

a. While a user entering a transaction, the phone connection becomes disconnected

For this case, the backward recovery technique should be used; because the transaction has needed to be re-entered. Backward recovery is the process of eliminating the unwanted changes made in the database.

Reason
This is a matching scenario because the aborted transaction is occurred (Disconnecting the phone connection); before the new process of the transaction has been started. Therefore, the “backward recovery” technique is the best matching recovery technique to re-enter the user's transaction.

b. While doing regular operations, a disk drive becomes a failure

The forward recovery technique should be used; because the disk becomes a failure, the forward recovery will recover the data from the log files. Forward recovery is the process of data recovery that recovers the data by implementing records of transactions in the database's log files.

Reason
The reason to take the forward recovery technique (with backup) in this scenario. Because the database destruction occurs due to the disk drive's failure, and the operations cannot be performed due to disk failure. Therefore, the “forward recovery” technique is the best matching recovery technique to back up the database's log files.

c. Power failure because of the lightning storm:

For this situation, the forward recovery technique should be used; because the sudden system failure does not store the latest operation done in the database. Forward recovery is the process of data recovery that recovers the data by implementing records of transactions in the database's log files.

Reason
In this situation, the system failure has occurred; because the power failure made the system fail. Therefore, it is best to implement the Forward recovery (from the latest checkpoint) to store the current operations in the database.

d. Incorrect amount entered for tuition fee, which error is not noted:

For this situation, many alternative techniques are possible to use. But preferably, backward recovery has been used to undo the entered wrong value and then process it using the new tuition amount. Otherwise, make another transaction to compensate for the tuition fee and notify the students about the error.

Reason
In this situation, the process actually results in incorrect data; the value entered for the tuition is incorrect. Therefore, to correct the tuition amount, it is better to use the backward recovery technique. So, the error can be resolved.

e. The transactions entered by the data entry clerks are not being backed up:

In this situation, the forward recovery (from the latest checkpoint) technique should be used. If the system is copied in the temporary memory, then the corrupted data can be rebuilt by using the copied data. If the system is not copied in the temporary memory, it is impossible to restart the process.

Reason
Here the preferable approach restarts the system with the most recent checkpoint, and manually, the transactions have been reprocessed. Hence, using the “forward recovery (from the latest checkpoint),” the transactions can be reprocessed. 

Post a Comment

Post a Comment (0)

Previous Post Next Post