distributed data base

User Generated

tbjgunzz

Computer Science

Description

file

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. Questioon 4: 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 attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hi bro. Here is it.

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.
Answer
S1 = R1(X), R2(X), R3(X), W1(X), W3(X)

This has to be not serializable because it has cycles.
There is a schedule for it and has (WW) conflict.
S2 = R2(X), R1(Y), W3(X), W2(X)

This has to be not serializable because it has cycles.
There is...


Anonymous
Excellent! Definitely coming back for more study materials.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags