Zybook 4-1 Flashcards
(15 cards)
All of the following signal an end of a transaction EXCEPT
a SAVEPOINT
How many SQL statements must be in one transaction?
At least one
After a transaction commits, the transaction can be rolled back:
Never
After a rollback, the database restarts a transaction:
Sometimes
A transaction increases all employee salaries by 10%. Due to a system failure, increases for only half of the employees are written to the database.
Atomic
A transaction saves a row with a foreign key. The foreign key is not NULL and does not match any values of the corresponding primary key.
Consistent
Two transactions running in parallel reserve the same seat for different passengers.
Isolated
A transaction withdraws $500 from account A and deposits $500 in account B. The withdrawal and deposit are written in the database, but due to a disk drive failure, the information is permanently lost.
Durable
T1 reads salaries of some Accounting department employees
T2 transfers Maria Rodriguez from Accounting to Development
T2 commits
T1 reads salaries of remaining Accounting employees
T1 computes and writes total salary of Accounting employees
T1 commits
Phantom Read
T2 increases Sam Snead’s salary by 20%
T1 reads Sam Snead’s salary
T2 rolls back
T1 computes and writes Sam Snead’s bonus based on his salary
T1 commits
Dirty Read
T1 computes total salary for the entire company
T2 increases Sam Snead’s salary by 20%
T2 commits
T1 computes total salary by department
T1 writes ( department total / company total ) for each department
T1 commits
Nonrepeatable Read
The action is always atomic.
False
The action is always consistent.
False
The action is always isolated.
False
The action is always durable.
False