Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's a real-world example of ACID? [closed]

Tags:

database

acid

I'm looking for a real-world example for the various ACID properties of a database.

like image 456
Fred Stanley Avatar asked Jun 16 '09 02:06

Fred Stanley


People also ask

What is a real world application of acid base chemistry?

The reaction of acids and bases to form water and salts is called neutralization, and it has a wide range of applications, including the promotion of plant growth in soil and the treatment of heartburn in the human stomach.


1 Answers

  • Atomicity - a transaction to transfer funds from one account to another involves making a withdrawal operation from the first account and a deposit operation on the second. If the deposit operation failed, you don’t want the withdrawal operation to happen either.

  • Consistency - a database tracking a checking account may only allow unique check numbers to exist for each transaction

  • Isolation - a teller looking up a balance must be isolated from a concurrent transaction involving a withdrawal from the same account. Only when the withdrawal transaction commits successfully and the teller looks at the balance again will the new balance be reported.

  • Durability - A system crash or any other failure must not be allowed to lose the results of a transaction or the contents of the database. Durability is often achieved through separate transaction logs that can "re-create" all transactions from some picked point in time (like a backup).

(summary of the real world examples from le dorfier's link)

like image 164
eggdrop Avatar answered Oct 12 '22 12:10

eggdrop