A Guide to Database Transactions: From ACID to Concurrency Control