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 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.
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.
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.
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.| 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.