Oracle and DB2, Comparison and Compatibility/Process Model/Logging

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Overview[edit | edit source]

Durability.

Every change that is made in the database is logged. Each transaction that performs an update, delete or insert writes a log entry. This is to ensure that no data is lost in the event of a system failure such as a disk crash. Because logging is a part of every transaction, the logging system has to be efficient.

It is very important that the data in the database is consistent. The way Oracle and DB2 handle this is by logging transactions that change the data (or the database). The log files on disk are stored (or at least should be stored) separately from the actual database data. They are not used unless there is a failure of the database or the machine running the database. As an additional level of security these log files can be written to off-line storage. These are the files that are used to recover from failures. Since every change to the database involves the logging system, its performance has an impact on database performance overall.