Show TOC

How Databases Store Data and Log EntriesLocate this document in the navigation structure

Use

Physical View

When a database user changes data in the database, the database system first writes the changed data to the data cache in the working memory, and redo log entries describing the changes to the log queue in the working memory.

For more information, see Working Memory Areas.

Later, the system writes the changed data to the data area in permanent storage (see Data Area), and the log entries to the log area in permanent storage (see Log Area).

The unit that the database system uses to write information to and read it from the permanent storage is a page of 8 KB. A page corresponds to a certain number of operating system blocks.

For more information, see Volumes (Permanent Storage).

Figure 1: Working Memory and Permanent Storage

When Does the System Write Data Changes to the Data Area?

The Pager tasks of the database system write the data changes from the data cache to the data area (permanent storage):

  • When the data cache is too full

    This depends, among other things, on the ratio between changed and read pages in the data cache.

  • During savepoints (see Savepoint)

When Does the System Write Log Entries to the Log Area?

The Log Writer task of the database system writes redo log entries from log queues to the log area:

  • When a log queue is full

  • When a transaction was completed with a COMMIT

  • During savepoints

Log pages in log queues that were not full at the time of writing remain there. The system continues to fill these log queues and writes them to the log area again during the next write process.

Logical View

The database system uses the following organizational structures to store data in the database:

  • Page chains

  • Pages in B* trees

For more information, see Logical Access Structures.

Figure 2: Logical Access Structures

How Is the Logical Information Assigned to Physical Pages?

The database system stores the assignment of logical data pages to physical addresses in the converter (see Converter).