⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’
Excalidraw Data
Text Elements
database
Task1
Task2
write add 1
a=4+1
variable a=4
a=5
commit fail txn reverted
a=4
but Task2 has wrong a values updated
Dirty Read
Non-Repeatable Reads, and Read Skew
read
a=5
write & commit a=7
read
a=7
suppose transaction T1 reads data. Due to concurrency, another transaction T2 updates the same data and commit, Now if transaction T1 rereads the same data, it will retrieve a different value
Phantom Reads
T1
T2
write
write allowed
Read uncommited Isolation level
commit
DB
write
Read Commited
T1
T2
DB
update
commit
read
write
Repeatable Read, all reads of a given txn should return the same value, no intermidiate write in between
T1
DB
T2
Read 1 of T1
Read 2 of T1
write