FlashKeepers

SQL · SQL · College and University

SQL Transactions and ACID Concurrency

Transaction isolation levels, locking, and the ACID properties, each explained with a short example.

About this set

29 basic cards for SQL SQL. It opens with "What does ACID stand for in database transactions?" and "Explain Atomicity in ACID". More College and University decks are listed below.

29 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What does ACID stand for in database transactions?
Show answerAtomicity, Consistency, Isolation, Durability
Explain Atomicity in ACID.
Show answerA transaction either completes entirely or not at all; partial changes never persist.
Explain Consistency in ACID.
Show answerThe database moves from one valid state to another; all constraints and rules are maintained.
Explain Isolation in ACID.
Show answerConcurrent transactions do not interfere with each other; each operates as if alone.
Explain Durability in ACID.
Show answerOnce committed, a transaction's changes persist permanently, even after failure.
What is a transaction in a relational database?
Show answerA sequence of SQL operations treated as a single unit, either all executed or all rolled back.
What is a dirty read?
Show answerReading uncommitted data from another transaction that may later be rolled back.
What is a non-repeatable read?
Show answerReading the same data twice in one transaction yields different values because another transaction modified and committed it.
What is a phantom read?
Show answerA query returns different sets of rows on repeated execution because another transaction inserted or deleted rows.
Which isolation level allows dirty reads?
Show answerRead Uncommitted
What anomalies does Read Committed prevent?
Show answerDirty reads. Does not prevent non-repeatable reads or phantom reads.
What anomalies does Repeatable Read prevent?
Show answerDirty reads and non-repeatable reads. Does not prevent phantom reads.
What anomalies does Serializable prevent?
Show answerAll three: dirty reads, non-repeatable reads, and phantom reads.
What is a shared lock?
Show answerA lock that allows multiple transactions to read the same data simultaneously, but prevents writing.
What is an exclusive lock?
Show answerA lock that allows only one transaction to access data; prevents both reading and writing by other transactions.

14 more cards in the app

Study this set free