Suppose for sake of argument that database elements are


What are suitable group modes for a lock table if the lock modes used are:

a) Shared and exclusive locks.

b) Shared, exclusive, and increment locks.

c) The lock modes of Exercise 18.4.6.

Exercise 18.4.6

Suppose for sake of argument that database elements are two-dimensional vectors. There are four operations we can perform on vectors, and each will have its own type of lock.

i. Change the value along the x-axis (an X-lock).

ii. Change the value along the y-axis (a F-lock).

iii. Change the angle of the vector (an A-lock).

iv. Change the magnitude of the vector (an M-lock).

Answer the following questions.

a) Which pairs of operations commute? For example, if we rotate the vector so its angle is 120° and then change the coordinate to be 10, is that the same as first changing the x-coordinate to 10 and then changing the angle to 120°?

b) Based on your answer to (a), what is the compatibility matrix for the four types of locks?

c) Suppose we changed the four operations so that instead of giving new values for a measure, the operations incremented the measure (e.g., "add 10 to the coordinate," or "rotate the vector 30° clockwise"). What would the compatibility matrix then be?

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Suppose for sake of argument that database elements are
Reference No:- TGS01596465

Expected delivery within 24 Hours