Atomicity is a powerful concept in databases. To help you understand it, I will throw out a quick real-world example.
Suppose you are searching the web and find a great travel bargain: a $500 air+hotel package to Hawaii! Now you have a problem: Do you book it now, or do you ask your boss for time off work first?
Say you go to ask your boss for time off work. But by the time that is approved, you come back to make the purchase, and the deal is over and they now want $900.
What if you book it right then and there, but then when you aks your boss for time off work, it is denied? Then you're out $500!
If real life were atomic, you could guarantee that both would succeed or both would fail. The price could be held until your time off gets approved, or if it could not be held, you would be refunded your money.Share on Twitter Share on Facebook