Learning how to use transaction isolation levels

You learned about isolation briefly in Chapter 8, Modifying Data and Table Structures, as part of the four properties of database transactions: Atomicity, Consistency, Isolation, and Durability (ACID).

There are a few key terms to understand before learning about isolation levels:

  • Dirty read: Let's say that one transaction (T1) is running and updating some data, and another transaction (T2) comes along to select data from that same table and returns the data, but then T1 rolls back. Now, the user who was running T2 thinks this data is how T1 would have left it, had it not rolled back.
  • Non-repeatable read: Like the previous example, we have two transactions executing (T1 and T2). T1 is executing ...

Get Learn SQL Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.