Unformatted Attachment Preview
CMP626 Assign 3:
Questions 5.1, 5.2 and 5.3 from text book
5.1 Check the serializability of each one of the following schedules:
S1 = R1(X), R2(X), R3(X), W1(X), W3(X)
S2 = R2(X), R1(Y), W3(X), W2(X)
S3 = W1(X), R2(X), W3(X), W2(X)
S4 = R1(X), R3(X), R2(X), W2(Y), W3(X)
S5 = R3(X), W1(X), R1(X), W2(X)
Indicate all RW, WR, and WW conflicts and show all partial commitment orders forced by
these conflicts. Indicate if the schedule is serializable. If it is, what is the total commitment
order? If it is not, indicate the first operation that causes the problem.
5.2 Assume the following three transactions in Figure 5.31 and the order in which they work
with data items X and Y. Show three schedules that are created by applying (A) no-locking, (B)
1PL, and (C) 2PL to these transactions. For each schedule in (A), (B), and (C), you should show
all partial commitment orders (PCOs) caused by all RW, WR, and WW conflicts. Are these
schedules serializable? If yes, what is the serialization order? If not, why?
Figure 5.31 Concurrent transactions for Exercise 5.2.
5.3 Assume the three transactions in Figure 5.32 and the order in which they work with items X
and Y. Answer the following for these three transactions, if we use (A) no-locking, (B) 1PL, and
(C) 2PL for concurrency control. Show the schedules for (A), (B), and (C). Find out all partial
commitment orders for RW, WR, and WW conflicts. If the schedule is serializable, what is the
serialization order? If not, why? Are there any deadlocks?
Figure 5.32 Concurrent transactions for Exercise 5.3.
Consider the join graph and the following information:
size(EMP) = 100, size(ASG) = 200, size(PROJ) = 300, size(EMP 1 ASG) = 300,
and size(ASG 1 PROJ) = 200. Describe an optimal join program based on the
objective function of total transmission time.
Question 5: Apply the dynamic query optimization algorithm to the following query and illustrate the successive
detachments and substitutions by giving the monorelation subqueries generated.
HINT: Use detachment example from class slides
SELECT ENAME, PNAME
FROM EMP, ASG, PROJ
WHERE (DUR > 12 OR RESP = “Analyst”)
AND EMP.ENO = ASG.ENO
AND (TITLE = “Elect. Eng.”
OR ASG.PNO < "P3") AND (DUR > 12 OR RESP NOT= “Analyst”)
AND ASG.PNO = PROJ.PNO
Purchase answer to see full
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more