ch17-updated-2019-03-08 Flashcards
(55 cards)
What is a transaction?
A unit of program execution that accesses and possibly updates various data items.
What is the atomicity requirement in transactions?
Either all operations of the transaction are properly reflected in the database or none are.
What does the durability requirement state?
Once a transaction has completed, the changes must persist even if there are system failures.
Define the consistency requirement in transactions.
A transaction must see a consistent database, and execution must preserve the consistency of the database.
What is the isolation requirement?
Each transaction must be unaware of other concurrently executing transactions.
What are the ACID properties of transactions?
- Atomicity
- Consistency
- Isolation
- Durability
What are the possible states of a transaction?
- Active
- Partially committed
- Failed
- Aborted
- Committed
What does a schedule in transaction processing refer to?
A sequence of instructions that specify the chronological order in which instructions of concurrent transactions are executed.
What is conflict serializability?
A schedule is conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting instructions.
What is view serializability?
A schedule is view serializable if it is view equivalent to a serial schedule.
What is the significance of a precedence graph in testing for conflict serializability?
A schedule is conflict serializable if and only if its precedence graph is acyclic.
What is a recoverable schedule?
If a transaction reads a data item previously written by another transaction, the commit operation of the first must appear before the commit operation of the second.
What is a cascading rollback?
A single transaction failure leads to a series of transaction rollbacks.
Define cascadeless schedules.
Schedules where cascading rollbacks cannot occur; the commit operation of a transaction appears before any transaction that reads its data.
What is the goal of concurrency control in databases?
To ensure that all possible schedules are either conflict or view serializable, and are recoverable and preferably cascadeless.
Fill in the blank: A transaction that cannot proceed due to a logical error is in the _______ state.
Failed
True or False: All conflict serializable schedules are also view serializable.
True
What happens if a transaction fails after step 3 and before step 6 in a fund transfer?
Money will be ‘lost’, leading to an inconsistent database state.
What is the benefit of executing multiple transactions concurrently?
Increased processor and disk utilization, leading to better transaction throughput.
What does the term ‘conflicting instructions’ refer to?
Instructions that access the same data item and at least one of which writes to that data item.
What is the main issue with erroneous transaction logic?
It can lead to an inconsistent database state.
What is the significance of ensuring isolation in transaction processing?
It prevents other transactions from accessing a partially updated database, maintaining consistency.
What algorithmic complexity is associated with cycle-detection in precedence graphs?
Order n^2 time, with better algorithms taking order n + e.
Fill in the blank: A transaction that has successfully completed is in the _______ state.
Committed