The principle of consistent read is that the query record is determined by the time point of the query. Even if the query record changes later, the data at that point should be obtained based on the pre-image record of rollback and persistence. How is ORACLE guaranteed? First, we need to know two situations:
1, SCN: System Change Number. This is an incremental number that will only increase and will not decrease. It is stored in the smallest unit block of ORACLE, but the SCN will increase when a block is changed.
2. the rollback segment record slot of the database. The transaction slot is used to allocate the rollback segment space. If you update a transaction, it is written into the transaction slot. If the transaction is not committed or rolled back, the transaction is active. When the database reads the block, it can identify this situation.
Therefore, when Oracle performs consistent read, it first checks whether the initiated SCN is greater than the SCN of the currently queried block. If it is smaller than, there is no doubt that the pre-image data will be obtained from the rollback segment. If the SCN is indeed greater than the SCN of the currently queried block, make sure that there are no active transactions for the block; otherwise, you still need to go to the previous image to find the block.
Therefore, ORACLE rollback segments can both roll back data and ensure consistent read.