title: What is the difference between a lock and a latch in the context of concurrent access to a database?
body: <p>I am trying to understand a paper on concurrent B-tree, in which the author mentioned latch vs lock, and how latches do not need a "Lock Manager". I have been trying to figure out what are differences between those two for two days.</p>
  
  <p>Google resulting in:</p>
  
  <p>"locks assure logical consistency of data.  They are implemented via a lock table, held for a long time (e.g. 2PL), and part of the deadlock detection mechanism.</p>
  
  <p>latches are like semaphores. They assure physical consistency of data and resources, which are not visible at the transactional level"</p>
  
  <p>However, I am still pretty confused. Can some one elaborate on this? and what exactly does a lock manager do? </p>
  
  <p>Thanks in advance.</p>