4 ms·
I like Jim Gray's simple explanation (as always) of the difference. A database has two white marbles and two black marbles. Transaction T1: Update all white t
by sriram_malhar 8y ago
I like Jim Gray's simple explanation (as always) of the difference.
A database has two white marbles and two black marbles.
Transaction T1: Update all white to black.
Transaction T2: Update all black to white.
A serializable database will ensure that the transactions happen in some serial order. At the end of performing them one after another, either all marbles are white or all black.
In snapshot isolation, T1 updates only the white marbles, T2 updates only the black marbles. So they are not seen as conflicting. The end result is that the database contains 2 black (formerly white) and 2 white marbles (formerly black),because the two transactions are working off a snapshot and not conflicting.