Consider a relation r(A, B, C) and a transaction T that does the following: find the maximum
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 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Database System Concepts
ISBN: 9780078022159
7th Edition
Authors: Abraham Silberschatz, Henry F. Korth, S. Sudarshan
Question Posted: