Define ACID in transactions.
ACID stands for Atomicity, Consistency, Isolation, and Durability in database transactions.
What does Atomicity ensure in transactions?
It ensures that all operations in a transaction are completed successfully or none at all.
True or false: Consistency guarantees that a transaction brings the database from one valid state to another.
TRUE
Fill in the blank: Isolation ensures that transactions do not ______ each other.
interfere
What is the purpose of Durability in transactions?
It guarantees that once a transaction is committed, it will remain so, even in case of a failure.
Define transaction in the context of databases.
A transaction is a sequence of operations performed as a single logical unit of work.
What is a commit in transaction management?
A commit finalizes a transaction, making all changes permanent in the database.
What is a rollback?
A rollback undoes all operations of a transaction, reverting the database to its previous state.
True or false: A transaction can be partially completed.
FALSE
What does serializability mean in transactions?
It means that the outcome of concurrent transactions is the same as if they were executed serially.
Fill in the blank: Dirty reads occur when a transaction reads data that is ______.
not yet committed
What is a phantom read?
A phantom read occurs when a transaction reads a set of rows that match a condition but finds different rows on subsequent reads.
Define isolation level.
Isolation levels determine how transaction integrity is visible to other transactions.
What are the four standard isolation levels?
Read Uncommitted, Read Committed, Repeatable Read, and Serializable.
True or false: Read Committed prevents dirty reads.
TRUE
Fill in the blank: Repeatable Read prevents ______ reads.
non-repeatable
What is the main advantage of using ACID transactions?
They ensure reliable processing of database transactions, maintaining data integrity.
What is a transaction log?
A transaction log records all changes made to the database to ensure durability and recovery.
True or false: ACID properties are only applicable to relational databases.
FALSE
What does two-phase commit ensure?
It ensures that all participants in a distributed transaction either commit or rollback together.
Fill in the blank: Optimistic concurrency control assumes that ______ will not occur.
conflicts
What is pessimistic concurrency control?
It locks resources to prevent conflicts during transaction execution.
Define transaction isolation.
Transaction isolation is the degree to which the operations in one transaction are isolated from others.
What is the ACID test?
The ACID test evaluates whether a database transaction adheres to the ACID properties.