1. We will use the following transaction schedule S for this problem. Assume autocommit is enabled.
T1 T2 T3 T4
write(A)
read(A)
write(B)
read(B)
write(C)
read(B)
(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:
SELECT SUM(daysoff) FROM Googler;
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
be returned by T1. Explain your answer.
(b) If T1 executes under the READ UNCOMMITTED isolation level and T2 under REPEATABLE READ access level,
and T3 under the SERIALIZABLE isolation level, list all possible values that can be returned by T1.
Explain your answer.
2
143, 5, Computer, Homework, Science
[SOLVED] Computer science 143 homework 5
$25
File Name: Computer_science_143_homework_5.zip
File Size: 292.02 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.