Commit, Rollback, Undo & Redo: Unveiling the Intricacies of Maintaining Data Integrity & Consistency in Oracle Database

Oracle Relational Database has a comprehensive system to ensure data integrity and consistency. Various processes and mechanisms are in place to safeguard these aspects. In this article, we will delve into the following: 1. How a transaction happens in the Oracle relational database 2. How Oracle handles rollbacks, whether initiated by the client or caused by fatal errors 3. The roles of UNDO and REDO 4. Factors affecting rollback performance Let's start with the transaction process and what happens in the backend when a DML statement executes. Transaction Execution in Oracle Database When a DML statement is executed, the data to be modified in the table is first read into the Buffer Cache if it is not already there. The Data Buffer is then modified by a process called the Database Writer (DBWn), which marks the modified buffers as dirty. This means the version of data in the buffer cache is different from the data in the disk and needs to be written to the disk. Before the ...