3 ms·
Yes, your description of database atomicity is wrong (i think!). In ACID, atomicity doesn't mean that a set of writes in one transaction become visible to othe
by twic 9y ago
Yes, your description of database atomicity is wrong (i think!).
In ACID, atomicity doesn't mean that a set of writes in one transaction become visible to other transactions all at the same time; it means that after the writing transaction is finished, they are either all applied, or none are applied.
In practice, that means if you successfully commit, all your data is saved, and if you successfully roll back, none of your data is saved. EDIT: I'm not sure what the guarantees are if either fail.
The property that the writes don't become visible to other transactions is isolation. This is where the infamous transaction isolation levels come in; with a weak level of isolation, writes in one transaction may be visible to others before they are committed.
- jorams 9y agoAlright, so the non-database definition of atomicity combines the Atomicity and Isolation of ACID. Thanks for helping clear that up. I don't think that makes it a "TOTALLY DIFFERENT THING", but it's definitely important to understand the difference.