Whenever using database it's frequently necessary to use transactions. Say for instance that I wish to transfer some money from account A to account B. This involved two queries: one for lowering the cash in account A and also the other to improve it in account B.
Theoretically I'm able to result in the queries individually, but errors happen. So, to be certain, I'm able to pack the 2 queries in the transaction and make certain that either both procedures finish regularly or free has transformed whatsoever. Nothing vanishes or perhaps is produced.
However , it appears in my experience this only changes the duty from me towards the database vendor. It is now as much as the database to create both procedures and make certain that either both of them are made or free has transformed. And also the database designers face exactly the same issues that errors happen.
What techniques do database suppliers use for the utmost safety for transactions?
The ACID - Implementations page on wikipedia will enable you to get began on write-ahead logging, shadow paging and multi-version concurrency control. Stick to the links to locate more.
Each DBMS vendor implements their very own calculations, frequently a number of different ones with respect to the context, full Acidity or relaxed needs, distributed transaction consistency needs etc...