Lesson Notes By Weeks and Term - Senior Secondary 3

Crash recovery I

Term: 2nd Term

Week: 1

Class: Senior Secondary School 3

Age: 17 years

Duration: 40 minutes of 2 periods each

Date:       

Subject:      Data Processing

Topic:-       Crash recovery I

SPECIFIC OBJECTIVES: At the end of the lesson, pupils should be able to

  1. Explain the meaning of crash recovery
  2. State the conditions that can lead to transaction failure
  3. Discuss ARIES and the principles behind it
  4. Outline the recovery procedures to follow after crash

INSTRUCTIONAL TECHNIQUES: Identification, explanation, questions and answers, demonstration, videos from source

INSTRUCTIONAL MATERIALS: Videos, loud speaker, pictures, Data Processing for senior Secondary Education by Hiit Plc, WAPB Computer Studies for Senior Secondary I by Adekunle et al, On-line Materials.

INSTRUCTIONAL PROCEDURES

PERIOD 1-2

PRESENTATION

TEACHER’S ACTIVITY

STUDENT’S ACTIVITY

STEP 1

INTRODUCTION

The teacher reviews the previous lesson on the role of a database administrator

Students pay attention

STEP 2

EXPLANATION

He explains the meaning of crash recovery and states the conditions that could result in transaction failure

 

Students pay attention and participates

STEP 3

DEMONSTRATION

He discusses ARIES and the principles behind it. He also outlines the recovery procedures after a crash

Students pay attention and participate

STEP 4

NOTE TAKING

The teacher writes a summarized note on the board

The students copy the note in their books

 

NOTE

CRASH RECOVERY

Crash recovery is the process by which the database is moved back to a consistent and usable state. This is done by rolling back incomplete transactions and completing committed transactions that were still in memory when the crash occurred. When the database is in a consistent and usable state, it has attained what is known as a point of consistency. Following a transaction failure, the database must be recovered.

CONDITIONS THAT CAN RESULT IN TRANSACTION FAILURE INCLUDE:

  1. A power failure on the machine causing the database manager and the database partitions on it to go down.
  2. A hardware failure such as memory corruption, or disk, CPU, or network failure.
  3. A serious operating system error that causes the DB to go down

INTRODUCTION TO ARIES (ALGORITHMS FOR RECOVERY AND ISOLATION EXPLOITING SEMANTICS

ARIES

This is a recovery algorithm designed to work with no-force, steal database approach. It is used by IBM DB2, MS SQL Server and many other database systems.

The three main principles that lie behind ARIES recovery algorithm

  1. Write Ahead Logging: Any change to an object is first recorded in the log, and then the log must be written to a stable storage before changes to the object are written to a disk.
  2. Repeating History during Redo: On restart, after a crash, ARIES retraces the actions of a database before the crash and brings the system back to the exact state that it was in before the crash. The n it undoes the transaction still active at crash time.
  3. Logging Changes during Undo: Change made to the database while undoing transactions are logged to ensure such an action isn’t repeated in the event of repeated restarts.

RECOVERY PROCEDURE AFTER CRASH 

The recovery works in three phases

  1. Analysis Phase: The first phase, analysis, computes all the necessary information from the log file.
  2. REDO Phase: The Redo phase restores the database to the exact state at the crash, including all the changes of uncommitted transactions that were running at that point time.
  3. UNDO Phase: The undo phase then undoes all uncommitted changes, leaving the database in a consistent state. After the redo phase the database reflects the exact state at the crash. However, the changes of uncommitted transactions have to be undone to restore the database to a consistent state.

 

EVALUATION:    1. Explain the meaning of crash recovery

  1. What are the conditions that could result in transaction                    failure?
  2. Discuss ARIES and the principles behind it
  3. Outline the recovery procedures after a crash

CLASSWORK: As in evaluation

CONCLUSION: The teacher commends the students positively