How many SQL statements must be in one transaction?
Exactly one
At least one
At least two - Answers At least one
After a transaction commits, the transaction can be rolled back:
Always
Sometimes
Never - Answers Never
After a rollback, the database restarts a transaction:
Always
Sometimes
Never - Answers 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. - Answers 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. - Answers Consistent
Two transactions running in parallel reserve the same seat for different passengers. - Answers 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. -
Answers 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 - Answers 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 - Answers 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 - Answers Nonrepeatable read
A bank stores checking account data in a database. The bank stores account owner data in a file on a
different computer. A database transaction creates a new owner in the file and assigns the owner to a
checking account in the database.
The transaction is always atomic.
True
False - Answers False
The transaction is always consistent.
True
False - Answers False
The transaction is always isolated.
True
False - Answers False
The transaction is always durable.
True
False - Answers False