20250714

I’m very sleepy.

ACID (atomicity, consistency, isolation, durability)

https://en.wikipedia.org/wiki/ACID

In the context of databases, a sequence of database operations that satisfies the ACID properties (which can be perceived as a single logical operation on the data) is called a transaction.

So basically, ACID is a set of properties that define key characteristics a database transaction should uphold.

Atomicity: Atomicity: A set of operations of a transaction is treated as a single unit, and it can completely succeed or fail, and no intermediate state is ever visible to other transactions or users.

Consistency: A transaction must move the database from one valid state to another, preserving all predefined rules, constraints, and invariants. These valid states are defined by the schema, integrity constraints such as foreign keys, and possibly busines logic, making the concept vaguer than the other ACID properties.

Isolation: A database must handle concurrent execution of transactions in such as way that each transaction’s effects are isolated from others. The outcome should be the same as if the transactions were executed sequentially, one after another. Different isolation levels provide varying guarantees about how strictly this isolation is enforced.

Durability: Once a transaction is committed, its changes must be permanently recorded by the database, even in the event of a system failure such as a program crash or power outage. This is typically achieved by writing data to non-volatile storage (e.g., disk or SSD (vs volatile RAM))


TODO:


index 20250713 20250715