The database system then writes out enough information to disk
The concept of Transaction Journalisation has been release in the 70's by Bernstein and Gray. The algorithm used is based on ARIES for all the Relational DBMS.
The way that does it is quite simple. Every write that must occurs in the database (INSERT, UPDATE, DELETE, but also CREATE, ALTER, DROP, GRANT...) need a safety net, until the all work is done. To do this, the values before modifiying the database state is physically copyed into a special storage called &quot;transaction log&quot;. After the data has been modified in memory, this transaction is marked as &quot;done&quot; in the transaction log, if no exception is raised. That is the COMMIT. In case of an exception (or a voluntary cancel of the writes) that's the ROLLBACK, and previous values are replaced in the memory.
I say that data are written in memory... Not on disk. But the problem is that a server has generally not enough memory to store inside the RAM all the datas.. Also, on a regular tempo, a process called CHECKPOINT is started in order to transcribe, on the data storage, the data modified in memory between two passages.
CHECKPOINT occurs generally on different objectives : a limit of amount of data, a limit of time and a limit on memory pressure...
Let me know if I am not clear or you want some complementary explanations
I am writing a french book about SQL and relational databases that explains all that folks...
To be complet, please read &quot;Database Management Systems 3rd Edition by Johannes Ramakrishnan Raghu page 536&quot;