title: Dealing with concurrency issues at the database level
body: <p>How would you go about dealing with multiple users accessing a database record concurrently, specifically if you have an instrument reservation table and you wish to prevent two users reserving the same instrument if they were to try reserving it at exactly the same time, I thought that setting the isolation level to serializable should do it, but as it turns out isolation level doesn’t do that, so how would you detect concurrent accesses to the entry and rollback any changes?
  I am using JDBC with MYSQL server, and InnoDB engine.</p>
  
  <p>thanks</p>