Zybook 4-1 Flashcards

(15 cards)

1
Q

All of the following signal an end of a transaction EXCEPT

A

a SAVEPOINT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many SQL statements must be in one transaction?

A

At least one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

After a transaction commits, the transaction can be rolled back:

A

Never

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

After a rollback, the database restarts a transaction:

A

Sometimes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.

A

Atomic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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.

A

Consistent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Two transactions running in parallel reserve the same seat for different passengers.

A

Isolated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.

A

Durable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

Phantom Read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

Dirty Read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

Nonrepeatable Read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The action is always atomic.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The action is always consistent.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The action is always isolated.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The action is always durable.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly