Transaction isolation level: the degree of isolation between one transaction's modification to the database and another transaction in parallel
Transaction isolation level: the degree of isolation between one transaction's modification to the database and another transaction in parallel
: Transaction T1 reads a statement that specifies the where condition and returns the result set. At this time, transaction T2 inserts a new row, which meets the where condition of T1. Then T1 uses the same condition to query again. The records inserted by T2 are displayed in the result set. This new record is an illusion.
: Transaction T1 reads a row of records, and then transaction T2 modifies the records that T1 has just read. Then T1 queries again and finds that the records read for the first time are different. This is called non-repeated read.
: Transaction T1 updates a row of records and has not submitted any modifications. This T2 reads the updated data, and T1 executes the rollback operation to cancel the modification, therefore, the row read by T2 is invalid, that is, dirty data.
A session can read the uncommitted UPDATE results of other transactions. If the transaction ends with a rollback, the read results may be incorrect, therefore, most databases do not use this isolation level.
Ii. isolation level and implementation mechanism in Oracle:
, Which is also an advantage of Oracle transaction processing.
Serializable isolation level (also known as transaction-level isolation). Read operations in a transaction can only read the data results submitted before the transaction starts. If another transaction is modifying the record at the time of reading, then Oracle will find the original unmodified records in the rollback segment or undo segment (and store the records in the rollback segment or undo segment before the transaction where the read operation is located starts ), at this time, the read operation will not wait because the corresponding record is updated.