ACID transactions, durability

Viewed 229

I am trying to understand ACID transactions, and I didn't get one thing about Durability.

As far as I get durability ensures that all completed transactions are saved, even if some sort of technology failure occurs. What does it mean to be saved even if some sort of technology failure occurs. For example, if my server is crushed during Transaction, before it saves data in database, how durability ensures that when server starts again it will saves data correctly?

1 Answers

In practice, transactions are either committed or rolled back in their entirety if when a technology failure occurs.

Failures involving unpredicted halts of servers (due to catastrophic destruction, for example) often result in the transaction being rolled back (the data left in the state before the transaction began, not in some intermediate state).

Rolled-back transactions must be repeated. That's up to the application program using the database. So, ACID puts a certain amount of burden on the application to know when transactions complete, or don't.

This is very complex subject in practice. Thousands upon thousands of programmer years have been spent making transaction processing as robust as it can be.

Related