Modes of Operation

Normal ModeBackup ModeRecover Mode
Read Record taken from DB. Record taken from DBB, if not found, taken from DB. If record found in DBB, copy it to DB, remove it from DBB and send it back.
If record not found in DBB, take it from DB.
Write Record written to DB. Record written to DBB. Write it to DB and remove it from DBB.
Delete Record deleted from DB. Mark record as delete in DBB. If record is not found in DBB remove it from DB. If record found in DBB and not marked as 'deleted' remove it from DBB and possibly remove if from DB. If record found in DBB but is marked 'deleted' remove it from DBB and DB and return error 'record not found'.