This article is in list format but may read better as prose. You can help by converting this article, if appropriate. Editing help is available. (June 2015)

In the field of databases in computer science, a transaction log (also transaction journal, database log, binary log or audit trail) is a history of actions executed by a database management system used to guarantee ACID properties over crashes or hardware failures. Physically, a log is a file listing changes to the database, stored in a stable storage format.

If, after a start, the database is found in an inconsistent state or not been shut down properly, the database management system reviews the database logs for uncommitted transactions and rolls back the changes made by these transactions. Additionally, all transactions that are already committed but whose changes were not yet materialized in the database are re-applied. Both are done to ensure atomicity and durability of transactions.

This term is not to be confused with other, human-readable logs that a database management system usually provides.

In database management systems, a journal is the record of data altered by a given process.[1][2][3][4]

Anatomy of a general database log

A database log record is made up of:

Types of database log records

This section needs additional citations for verification. Please help improve this article by adding citations to reliable sources in this section. Unsourced material may be challenged and removed. (July 2016) (Learn how and when to remove this message)

All log records include the general log attributes above, and also other attributes depending on their type (which is recorded in the Type attribute, as above).

See also