Database Recovery Techniques in DBMS
Database Recovery Techniques in DBMS
Database Failure:
In every computer database management system, there is a possibility of computer hardware or computer software failure. The failures may occur without warning. The data in the database may be lost or damaged due to the failures of DBMS. After a failure occurs, a DBMS should recover the information that was entered into the database.
Reasons for Database Failure:
The most common failures are as follows:
- Failure of a computer system
- Break down of hardware.
- Program bugs
- User mistakes
Types of Failures:
Generally, there are two types of failure:
- System Failure
A computer system failure is also said to be an instance of failure. It is a failure of the main memory of a computer system. Computer system failures may be caused by a power failure of a database, an application or operating system crash, memory error, or some other reason. The end result is the unexpected termination of the database management system software.
- Media Failure
Media failure is known as Disk failure. It is a failure of the computer network disk storage system of a computer system. Media failures are usually caused by a head crash, fire, or exposure to vibration outside its physical operating limits.
Database Recovery:
A database is very important for any organization. It is very important to recover as soon as possible from a computer network system. Different ways for database recovery are as follows:
- Recovery by Reprocessing:
The simplest way to recover data is to take regular backup of the database. If there's any failure in the database, the backup of the database cab is restored. The network transactions processed after the last backup are then reprocessed.Reprocessing means to redo all events of any type or what we enter in the same way as they were done earlier. For example, if several transactions from an ATM are lost, reprocessing means going back to an ATM and performing the same transactions in the same order.
2. Recovery by Rollback/Rollforward:
In this strategy, a computer system transaction log file is created. The transaction logs are created to facilitate the recovery of the database. All transactions that make changes to the computer database management system are recorded in the transaction log before they are applied to the database system. If there is any failure in the computer network system, the log file is used to reapply all changes to the database. It is different from reprocessing as the application program is not involved in this function.
A computer database system that has been completely corrupted may require forward recovery from the last backup. This process would apply after different images of committed transactions to the backup copy in a system.
Secondly, the method of rollback is applied. In this process, all changes made by different computer systems transactions are undone. Then the valid computer system transactions that were in process at the time of failure are restored. Transactions that were incomplete at the time of failure are restored. Transactions that were incomplete at the time of failure are identified and the before image is applied to the database.
Both roll forward and rollback require a log file. All changes are store in log files before the changes are applied to the database.
Types of Backup:
Backup is used to protect the database from media failures or other errors. One or more database files may be physically damaged and unusable after a media failure. The most recent computer backup system can be used to replace the damaged files and reconstruct the computer database system.
There are two main types of database backups which are as following:
- Full backup
- Incremental backup
- Online
- Offline
Full Backup:
A full backup is used to create a copy of all data of the entire database. It requires a large amount of storage space. However, a database can be restored relatively quickly using a full backup as it requires simply copy the backup files.
Incremental Backup:
An incremental backup creates a copy of only the data that have changed temporarily since the last backup of a system. since an incremental backup only contains changes made to the database, the user must perform a full backup before the incremental database to restore the database at a later time. An incremental backup system requires a small amount of storage space. However, it may take more time to restore a computer network database system.
Offline Backups:
It is a backup that is performed after a database has been shut down. The computer database network system administrator must schedule a time to shut down the database and notify all users so they can disconnect from the database.
Online Backup:
It is a backup that can be performed while a database is running. The computer database system administrator does not have to shut down the database. The users do not need to disconnect. Online backups are more convenient for users as they perform no actions,
Online backup is performed by using the commands of DBMS on a computer system. The DBMS should provide the facility for online backup as DBMS is running when an online backup is performed.
Database Security:
Database security is the process of protecting databases from international or accidental threats. It includes the security of computer hardware, computer software, people, and data related to a database system. The appropriate controls must be used to implement security effectively to maintain. The basic purpose of database security is to minimize the losses that may occur due to different security threats.
Important Factors:
- Theft and Fraud
- Loss of Confidentiality
- Loss of Privacy
- Loss of integrity
- Loss of Availability
Database Security Threats:
A computer network database system security threat is a situation or event that may affect a system adversely. These threats may occur intentionally or unintentionally. A threat may be a result of an event that involves a person or action to harm the system. The system harm may result in tangible damage such as loss of computer hardware, computer software or data, etc.
Measures against Threats:
Different measures can be taken against database threats. The measures include physical controls and administrative procedures.
- Authorization
- Authentication
- Views
- Backup & Recovery
- Integrity
- Encryption
Comments
Post a Comment