ACID properties - Deepstash
ACID properties

ACID properties

Curated from: en.wikipedia.org

Ideas, facts & insights covering these topics:

6 ideas

·

308 reads

3

1

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

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

181 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

24 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

21 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

22 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

50 reads

IDEAS CURATED BY

Mircea-Ioan Oprea's ideas are part of this journey:

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

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

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