Database Transactions: ACID Properties, Schedules, and Concurrency Control

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

28 Terms

1
New cards

What is a transaction?

A sequence of database operations executed as one logical unit.

2
New cards

Intuition of a transaction

A "mini-program" that must happen completely or not at all.

3
New cards

Example of a transaction

Withdraw $100: Read balance → subtract → write new balance.

4
New cards

Why transactions matter

Everything in concurrency control + recovery is built around transactions.

5
New cards

ACID: Atomicity

A transaction's changes occur entirely or not at all.

6
New cards

Intuition of Atomicity

No partial updates allowed.

7
New cards

Example of Atomicity

If ATM crashes mid-withdrawal, your balance must not change.

8
New cards

Why Atomicity matters

Exam will ask which component (logging) enforces atomicity.

9
New cards

ACID: Consistency

A transaction must bring the DB from one valid state to another valid state.

10
New cards

Intuition of Consistency

"Rules of the world" must remain true.

11
New cards

Example of Consistency

Account balance must never be negative.

12
New cards

Why Consistency matters

Consistency constraints appear in SQL and recovery questions.

13
New cards

ACID: Isolation

Concurrent transactions must behave as if executed one at a time.

14
New cards

Intuition of Isolation

Your transaction should run as if nobody else exists.

15
New cards

Example of Isolation

Two transfers happening shouldn't see each other's temporary states.

16
New cards

Why Isolation matters

All serializability questions = testing isolation.

17
New cards

ACID: Durability

Once a transaction commits, its changes are permanent even if system crashes.

18
New cards

Intuition of Durability

If it says "Transaction Complete," it must survive any crash.

19
New cards

Example of Durability

Deposit $500 → power outage → money still deposited.

20
New cards

Why Durability matters

ARIES + WAL enforce durability.

21
New cards

What is a schedule?

An interleaving of operations from multiple transactions.

22
New cards

Intuition of a schedule

What actually happens when transactions run concurrently.

23
New cards

Example of a schedule

T1: R(X), T2: W(Y), T1: W(X), T2: R(Y)

24
New cards

Why schedules matter

Used to determine serializability.

25
New cards

What is a serial schedule?

Transactions run one after another, with no interleaving.

26
New cards

Intuition of a serial schedule

Take turns — T1 runs, then T2 runs.

27
New cards

Example of a serial schedule

T1 R(X) W(X) → T2 R(X) W(X)

28
New cards

Why serial schedules matter

Always correct; used as a baseline for correctness.