Transaction Management and Concurrency Control Flashcards
What does a logical unit of work that must be entirely completed or aborted consist of?
SELECT statement
Series of related UPDATE statements
Series of INSERT statements
Combination of SELECT, UPDATE, and INSERT statements
What does a consistent database state?
All data integrity constraints are satisfied
Must begin with the database in a known consistent state to ensure consistency
How are most transactions formed?
They are formed by two or more database requests
What are database requests?
They are the equivalent of a single SQL statement in an application program or transaction
Why aren’t all transactions updated in the database?
Because SQL code represents a transaction because it accesses the database
How can improper or incomplete transactions can have devastating effect on database integrity?
Users can define enforceable constraints based on business rules
Other integrity rules are automatically enforced by the DBMS
What is atomicity?
All operations of a transaction must be completed; if not the transaction is aborted
What is consistency?
Permanence of database’s consistent state
What is isolation?
Data used during transaction cannot be used by second transaction until the first is completed
What is durability?
Ensures that once transactions are committed they cannot be undone or lost
What is serializability?
Ensures that the schedule for the concurrent execution of several transactions should yield consistent results
What SQL statements provide transaction support?
COMMIT
ROLLBACK
When should the transaction sequence continue until one of four events occur?
COMMIT statement is reached
ROLLBACK statement is reached
End of program is reached
Program is abnormally terminated
What does a transaction log do?
Keeps track of all transactions that update the database
What does the DBMS use the information stored in a log for?
Recovery requirement triggered by a ROLLBACK statement
Program’s abnormal termination
System failure