Question: Consider a relation r(A, B, C) and a transaction T that does the following: find the maximum A value in r, and insert a new

Consider a relation r(A, B, C) and a transaction T that does the following: find the maximum A value in r, and insert a new tuple in r whose A value is 1+ the maximum A value. Assume that an index is used to find the maximum A value.

a. Suppose that the transaction locks each tuple it reads in S mode, and the tuple it creates in X mode and performs no other locking. Now suppose two instances of T are run concurrently. Explain how the resultant execution could be non-serializable.

b. Now suppose that r.A is declared as a primary key. Can the above non serializable execution occur in this case? Explain why or why not.

Step by Step Solution

3.40 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

the nonserializable execution can occur if both transactions are waiting f... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Database System Concepts Questions!