Final_DBM2 - 1. What is lock granularity? The size of a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. What is lock granularity? The size of a locked data element. The lock of a column value of a particular row is a small granularity lock, and the lock of an entire table is a large granularity lock. 2. Explain two-phased locking The procedure by which locks are obtained and released in two phases. During the growing phase, the locks are obtained, and during the shrinking phase, the locks are released. After a lock is released, no other lock will be granted that transaction. Such a procedure ensures consistency in database updates in a concurrent-processing environment. 3. Explain the difference between optimistic and pessimistic locking Optimistic Locking: A locking strategy that assumes no conflict will occur, processes a transaction, and then checks to determine weather conflict did occur. If so, the transaction is aborted. Pessimistic Locking: A locking strategy that prevents conflict by placing locks before processing database read and write request. 4. Explain the use of BEGIN, COMMIT, ROLLBACK transaction statements
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Final_DBM2 - 1. What is lock granularity? The size of a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online