Recovery

Physical modelEven if best database management practices are followed, there is no guarantee that disasters and accidents won't happen. Minimising the impact and recovering from these situations is the subject of this topic.

Recovery

Textbook reading
Ch11 pp 522-527

The reading, Database Backup and Recovery, examines the common approaches taken to recovering from disasters so that data loses and disruptions to the normal operations of the database are minimised.

Remember
Remember, Oracle does not implement the BEGIN TRANSACTION statement.

 

Have a go: risk management

 

Getting your hands dirty

ACID Properties

1. In the last topic, Concurrency, you and a partner tried to make simultaneous changes to the database. How are each of the ACID properties followed (see p. 525, textbook)?

Atomic:
View the answer

In SQL*Plus the end of a successful transaction is at the COMMIT statement (or leaving SQL*Plus . If you made a change to a row, your partner was not allowed to change that row until you had issued a COMMIT. That is the next transaction (your partner) cannot start until your transaction has finished. If SQL*Plus did allow your partner to make a change before you committed what would happen if you now choose to do a ROLLBACK?

Consistent:
View the answer

Integrity constraints (e.g. foreign keys, CHECKS etc) are maintained

Isolated:
View the answer

Remember if you updated the database (but did not COMMIT), you could use a SELECT query to see the changes but if your partner issued the same SELECT query they would not see the changes. When you COMMIT the changes became visible.

Durable:
View the answer

This property was not really tested.