KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When working with database it is often essential to use transactions. Say for example that I want to transfer a certain amount of money from account A to account B. This involves two queries: decrease the money in account A increase it in account B. In theory I can make the queries separately, but errors happen. So, to be sure, I can pack the two queries inside a transaction and be sure that either both operations end regularly or nothing has changed at all. No money disappears or is created. The problem is that it seems to me that this only shifts the responsibility from me to the database vendor. Now it is up to the database to make both operations and be sure that either both are made or nothing has changed. And the database developers face the same problems that errors happen. What techniques do database vendors use to ensure safety for transactions?
Tags (comma-separated)
Save Edits
Cancel