# Computer Science 143 Homework 5

\$30.00

## Description

1. We will use the following transaction schedule S for this problem. Assume autocommit is enabled.
T1 T2 T3 T4
write(A)
write(B)
write(C)
(a) Is S serial?
(b) Is S conflict serializable? If so, what are the equivalent serial schedules?
2. Consider the relation Googler(name, daysoff) where we store the number of days off a Googler has remaining this year, and name is the key. Suppose we execute the following three transactions.
T1:
COMMIT;
T2: In this transaction, Google gives everyone an extra day off, and Larry Page gets an additional 10 days
off because he is awesome.
UPDATE Googler SET daysoff = daysoff + 1;
UPDATE Googler SET daysoff = daysoff + 10 WHERE name = “Larry Page”;
T3: We give a few others some more days off in this transaction. We will also set the number of days off for
Xooglers to zero.
UPDATE Googler SET daysoff = daysoff + 10 WHERE name = “Larry Page”;
UPDATE Googler SET daysoff = 0 WHERE name = “James Damore”;
1
The Googler table originally has two tuples (’Larry Page’, 15) and (’James Damore’, 15). Assume
that individual SQL statements execute atomically.
(a) If all three transactions execute under the SERIALIZABLE isolation level, list all possible values that can