CS4482tut9a - 2. a) employee = ( employee 1 employee 2)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS4482/6492 Advanced Database Systems Tutorial 9 1. a) For a locking protocol, it is necessary to ensure that there can be only one transaction access a data item at a time. If two transactions had accesses to the same data item, there would be at least one lock manager storing a replica of the data item that had granted locks to both (since n /2+1 + n /2 +1 > n ), which is impossible. b) It is necessary to ensure that there cannot be both a shared and exclusive lock on a data item. If one transaction had a shared lock on a data item and another had an exclusive lock (on all replicas) on the same data item, then there must be a lock manager storing a replica of the data item that had granted both shared and exclusive locks at the same time (since 1+ n > n ), which is again impossible.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. a) employee = ( employee 1 employee 2) employee 3 b) name ( ID = ‘1010’ ( employee )) = name ( ID = ‘1010’ (( employee 1 employee 2) employee 3)) = name ( ID = ‘1010’ employee 2 employee 3) = name ( ID = ‘1010’ employee 2) 3. 1. Transfer both the employee and the deparment relations to Site 3 and perform the join there. Cost = 100 * 10,000 + 35 * 100 = 1,003,500 bytes 2. Transfer the employee relation to Site 2, execute the join there, and send the result to Site 3. Cost = 100 * 10,000 + 40 * 10,000 = 1,400,000 bytes 3. Transfer the department relation to Site 1, execute the join there, and send the result to Site 3. Cost = 35 * 100 + 40 * 10,000 = 403,500 bytes...
View Full Document

Ask a homework question - tutors are online