One of the main internal functions of the database system is logging.
In normal database operation (operational state ONLINE), the modifying SQL statements of every transaction must be logged, meaning that log entries (redo and undo log entries) are written. These log entries are created so that the database system can ensure transaction consistency and so that individual SQL statements can be reversed if required. In addition, the undo log entries are needed to enable consistent reading without locking.
Online logging is needed to store the log entries so that they are always available for normal database operation.
In the case of a restart or restore, the required log entries must be made available and re-read in the correct chronological sequence.