We use cookies to enhance your experience on the site
CodeWorlds

The ACID principles - four pillars of trust

Every solid database rests on four principles whose first letters spell the word ACID. They are what let you trust the data in the Library.

A - Atomicity

A transaction is indivisible. It runs entirely or not at all. There is no "halfway" state - either the book is borrowed and marked unavailable, or nothing changed.

C - Consistency

After a transaction finishes, the database remains in a correct state, in line with all the rules (e.g. foreign keys). No loans will appear that point to a non-existent reader.

I - Isolation

When several scribes work at once, their transactions do not mix. One transaction does not see another's uncommitted changes. Each one feels like it is working alone.

D - Durability

After

COMMIT
the changes are permanent forever. Not even a power failure or a server restart will erase them - the Keeper has carved them in stone.

Summary

| Letter | Principle | Meaning | |--------|-----------|---------| | A | Atomicity | all or nothing | | C | Consistency | the database always correct | | I | Isolation | transactions do not mix | | D | Durability | COMMIT is forever |

Remember these four pillars - they are the foundation of trust in every database.

Go to CodeWorlds