ACID properties - Deepstash
ACID properties

ACID properties

en.wikipedia.org

6 ideas

·

298 reads

3

1

Getting started with Cryptocurrency

Learn more about crypto with this collection

Understanding the basics of cryptocurrency

How to store cryptocurrency securely

Risks and benefits of investing in cryptocurrency

Getting started with Cryptocurrency

Discover 84 similar ideas in

It takes just

13 mins to read

ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. 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.

8

179 reads

Atomicity

Transactions are often composed of multiple statements. Atomicity guarantees that each transaction is treated as a single "unit", which either succeeds completely, or fails completely: if any of the statements constituting a transaction fails to complete, the entire transaction fails and the database is left unchanged. An atomic system must guarantee atomicity in every situation, including power failures and errors/crashes. For example, a transfer of funds between two banks, even involving multiple changes such as debiting one account and crediting another, is a single transaction.

6

22 reads

Consistency

Consistency ensures that a transaction can only bring the database from one valid state to another, maintaining database invariants: any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This prevents database corruption by an illegal transaction, but does not guarantee that a transaction is correct.

6

19 reads

Isolation

Transactions are often executed concurrently. Isolation ensures that concurrent execution of transactions leaves the database in the same state that would have been obtained if the transactions were executed sequentially. There are four layers: read uncommitted, read committed, repeatable reads and serializable. In PostgreSQL the default one is READ COMMITED, meaning that when a transaction runs on this isolation level, a SELECT query sees only data committed before the query began and never sees either uncommitted data or changes committed during query execution by concurrent transactions.

6

10 reads

Durability

Durability is the property which guarantees that transactions that have committed will survive permanently. For example, if a flight booking reports that a seat has successfully been booked, then the seat will remain booked even if the system crashes.

6

20 reads

More on Isolation - read phenomena

The ANSI/ISO standard SQL 92 refers to three different read phenomena when a transaction reads data that another transaction might have changed. These are dirty reads (when a transaction is allowed to read data from a row that has been modified by another running transaction and not yet committed), non-repeatable reads (during the course of a transaction, a row is retrieved twice and the values within the row differ between reads) and phantom reads (when, in the course of a transaction, new rows are added or removed by another transaction to the records being read).

6

48 reads

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates