From the course: Programming Foundations: Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

ACID and transactions

ACID and transactions

From the course: Programming Foundations: Databases

Start my 1-month free trial

ACID and transactions

- The data in our database needs to remain accurate and that means we need to be careful about how we update or modify information it contains. If we are simply adding or removing a customer in our customer table, for example, it's a pretty straightforward operation. One record is added or one record is removed, but in a more complex interaction, such as transferring money between bank accounts where more than one operation makes up the task, we need to be more strict about how the change to the data takes place. In this case, the complex operation of transferring money between accounts takes a few steps. Checking the balance of the debited account, updating the balance to reflect a withdrawal, checking the balance of the credited account, and updating the balance to reflect the added money. Modern systems are able to process information very quickly but not instantaneously, so some error could interrupt the process. We could suffer a power failure in the middle of the operation…

Contents