External failure-database recovery and security, Database Management System

External failure: A failure can also result because of an external cause, such as earthquakes, fire, floods, etc. The database must be duly backed up to avoid troubles occurring due to such failures.

In practice software failures are more ordinary than hardware failures.  Fortunately, recovery from software failures is much faster.

The essential unit of recovery is a transaction. But, how are the transactions can handle during recovery? Let some transactions are deadlocked, then at least one of these transactions has to be start again to break the deadlock and therefore the partial updates made by such restarted program in the database require to be undone so that the database did not go to an inconsistent state. So the transaction must roll back which makes sure that the transaction does not bring the database to an inconsistent state. This is one type of recovery. Let us take a case when a transaction has committed but the alteration made by the transaction has not been communicated to permanently store physical database. A software failure now happens and the contents of the RAM / CPU are lost. This remains the database in an inconsistent state. Such failure needs that on restarting the system the database be brought to a consistent state by using redo operation. The redo operation needs the changes made by the transaction again to bring the system to a consistent state. The database system then could be made available to the users. The main point here is that the database updates are performed in the buffer in the memory. Figure shows some cases of redo and undo. You can make more such cases.

                               511_External failure.png

 

Physical

Database

RAM

Activity

Case 1

A=6000

B=8000

A=4000

B=8000

Transaction T1 has just changed the value in RAM. Now it aborts, value in RAM is lost. No problem. But we are not sure that the physical database has been written back, so must undo.

Case 2

A=4000

B=8000

A=4000

B=8000

The value in physical database has got updated due to buffer management, now the transaction aborts. The transaction must be undone.

Case 3

A=6000

B=8000

A=4000

B=10000

Commit

The value B in physical database has not got updated due to buffer management. In case of failure now when the transaction has committed. The changes of transaction must be redone to ensure transfer of correct values to physical database.

                                                    Figure: Database Updates and Recovery

Posted Date: 3/12/2013 3:36:57 AM | Location : United States







Related Discussions:- External failure-database recovery and security, Assignment Help, Ask Question on External failure-database recovery and security, Get Answer, Expert's Help, External failure-database recovery and security Discussions

Write discussion on External failure-database recovery and security
Your posts are moderated
Related Questions
Q.1 Briefly discuss the different layers of ANSI SPARC architecture. Ans: The three layers of ANSI SPARC architecture are like this: 1. Internal view is at the lowest leve


What is the need for triggers? Triggers are useful mechanisms for alerting humans or for starting particular tasks automatically when particular conditions are met.

Q. Describe how an ER schema can be represented by relation schemas and constraints arising from ER design can be mapped to constraints on a relation schema.     The entity rela

This assignment concerns the Research database. The database ER model is shown above, where attributes are omitted for clarity. The relational model for the database is: Departm

1. Will you advise that your organization uses open source software and why? 2. Why is it important for business managers to have a basic understanding of the software development

What are the benefits of OOA technology? Using OOA technology can produce many benefits, such as:  i) Reusability of code  ii) Productivity is gained through direct mappi

Determine the Strong and Weak Entity Based on the method of foreign key, there might be arise a situation when we have to relate an entity having a primary key of its own and a

What is Secondary Index While making the index, generally the index table is kept in the primary memory (RAM) and the main table, because of its size is keeps in the secondary