Database Security & Recovery
Database Security & Recovery
Database Security & Recovery
Anchal Mishra
WHAT IS RECOVERY
During the life of a transaction, that is, a after the
start of a transaction but before the transaction
commits, several changes may be made in a
database state. The database during such a state
is in an inconsistent state. What happens when a
failure occurs at this stage? Why did this problem
occur? Because although a transaction is
considered to be atomic, yet it has a life cycle
during which the database gets into an
inconsistent state and failure has occurred at that
stage.
What is the solution? In this case where the
transaction has not yet committed the changes
made by it, the partial updates need to be
undone.
How can we do that? By remembering information
about a transaction such as when did it start,
what items it updated etc. All such details are
kept in a log file.
Kinds of Failures
• Software failures
• Hardware failure
• External failure
Software Failures
In such cases, a software error abruptly stops the
execution of the current transaction (or all transactions),
thus leading to losing the state of program excution and
the state/ contents of the buffers. But what is a buffer?
A buffer is the portion of RAM that stores the partial
contents of database that is currently needed by the
transaction. The software failures can further be
subdivided as:
• Statement or application program failure
• Failure due to viruses
• DBMS software failure
• Operating system failure
Hardware Failures