Skip to content

The transaction log

All of the details of a transaction - the tables involved and the data - are saved into a transaction log. The importance of the transaction log is that it can be used to return the database to a previous consistent state (after a system failure, for example). It is actually integral in creating the illusion of the "private copy" that we have just seen. The elements of the transaction are queued in the transaction log and are then executed as a set when the commit command is issued. The operations can be just as easily rolled back since they have not yet been made permanent in the database.

The transaction log contains all of the database operations that have been performed since the last database backup. This means that it can also be used to bring the database up to date in case of some kind of serious system failure. This use of the transaction log will be covered in more detail in week 11.

All the main database platform manufacturers manage transaction log in slightly different ways, and for that reason they often use their own terminology. Oracle for example uses the term redo log while Microsoft SQL Server uses the standard transaction log.

Further reading

Managing the Redo Log

Transaction log