Database recovery are the mechanism for restoring a database quickly and accurately after loss or damage inevitably, database are damaged or lost because of some system problem that may be caused by human error, hardware failure, incorrect or invalid data, program errors, computer virus, or natural catastrophes. Since the organization depends so heavily on its database, the database management system must provide mechanisms of recovery.
Basic Database Recovery Facilities
A database management system should provide four basic facilities for backup and recovery of a database:
⇒Backup Facilities: The DBMS should provide backup facilities that produce a backup copy of the entire database. Typically, a backup copy is produced at least once per day. The copy should be stored in a secured location where it is protected from loss or damage. The backup copy is used to restore the database in the event of hardware failure, catastrophic loss or damage.
⇒Journalizing Facilities: A DBMS must provide journalizing facilities to produce an audit trail of transactions and database changes. In the event of a failure, a consistent database state can be reestablished using the information in the journals together with the most resent complete backup. There are two basic journals or logs:
The first is the transaction log, which contains a record of the essential data for each transactions. Data that are typically recorded for each transaction include the transaction code or identification, time of the transactions, terminal number or user id, input data values, records accessed and record modified.
The second kind of log is the database changed log which contains before—and after— images of records that have been modified by transactions. A before image is simple a copy of a record before it has been modified and an after image is a copy of the same record after it has been modified.
⇒Checkpoint Facility: Checkpoint facility is facility by which the DBMS periodically refuses to accept any new transaction. The checkpoint record contains information necessary to restart the system. A DBMS may perform checkpoints automatically or in response to commands in user application programs.
⇒Recovery Manager: The recovery manager is a module of the DBMS that restores the database to a correct condition when a failure occurs, and resumes processing user requests. The recovery manager uses the logs as well as the backup copy to restore the database.
Studying at the University of Rajshahi.