Hi, I was just reading about RDBMS, and one property of an RDBMS is atomicity. So, if money is withdrawn from an account and transferred to another, either the transaction will happen completely or not at all. There are no partial transactions. But how is actually ensured?
Sql queries for the above scenario
might look like
(i) UPDATE accounts
set balance = balance - amount WHERE ac_num = 101
(ii) UPDATE accounts
set balance = balance + amount WHERE ac_num = 102
Which by no means ensures atomicity.. So how does it actually happen?