What is a database transaction?
A transaction is a group of database operations treated as one logical unit.
Study 6 Transactions and Concurrency Basics with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a database transaction?
A transaction is a group of database operations treated as one logical unit.
What does atomicity guarantee?
Atomicity means all operations in a transaction take effect, or none do; uncommitted changes can be rolled back.
What does consistency mean in ACID?
Consistency means a transaction preserves defined database rules, such as constraints and business rules.
What does isolation control?
Isolation controls which changes concurrent transactions can see and aims to prevent unacceptable interference.
What does durability guarantee?
Durability means successfully committed changes are recorded to survive system failure, subject to database guarantees and configuration.
What does `BEGIN` do?
`BEGIN` (or `START TRANSACTION`) starts a transaction block.
What does `COMMIT` do?
`COMMIT` makes a transaction's changes permanent and visible to other transactions.
What does `ROLLBACK` do?
`ROLLBACK` cancels a transaction's uncommitted changes.
How does a savepoint help within a transaction?
A `SAVEPOINT` marks a position in a transaction. `ROLLBACK TO SAVEPOINT` undoes work after that point while retaining earlier work.
What is autocommit?
With autocommit, each standalone statement is treated as its own transaction and committed if it succeeds.
Why group several related statements in a transaction?
Explicitly group statements in a transaction when they must succeed or fail together; autocommit otherwise treats standalone statements separately.
What are four common isolation-level names?
Common isolation-level names are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, and `SERIALIZABLE`.