Question: Suppose the lock hierarchy for a database consists of database, relations, and tuples. a. If a transaction needs to read a lot of tuples from
Suppose the lock hierarchy for a database consists of database, relations, and tuples.
a. If a transaction needs to read a lot of tuples from a relation r, what locks should it acquire?
b. Now suppose the transaction wants to update a few of the tuples in r after reading a lot of tuples. What locks should it acquire?
c. If at run-time the transaction finds that it needs to actually update a very large number of tuples (after acquiring locks assuming only a few tuples would be updated). What problems would this cause to the lock table, and what could the database do to avoid the problem?
Step by Step Solution
3.37 Rating (166 Votes )
There are 3 Steps involved in it
a The transaction would acquire read locks on the tuples that it needs to read from the relat... View full answer
Get step-by-step solutions from verified subject matter experts
