transactions_flashcards
What does ACID stand for in database transactions?
Atomicity, Consistency, Isolation, Durability
What is Atomicity in the context of transactions?
A transaction is all-or-nothing; if one part fails, the whole transaction fails.
What is Consistency in the context of transactions?
A transaction brings the database from one valid state to another, maintaining database rules.
What is Isolation in ACID?
Transactions are executed independently and transparently.
What is Durability in ACID?
Once a transaction is committed, its effects are permanent even in case of a crash.
What is a deadlock?
A situation where two or more transactions wait indefinitely for each other to release locks.
What are two types of locking?
Shared lock (read only) and Exclusive lock (read/write).
What is optimistic concurrency control?
Assumes conflicts are rare and resolves them after they occur, using versioning.
What is the purpose of concurrency control?
To prevent data inconsistencies due to simultaneous operations.
What is a two-phase locking protocol?
A method to ensure serializability with a growing phase (acquire locks) and a shrinking phase (release locks).