title: How to avoid sqlite database being overwritten by other party
body: <p>I am working on an app which is meant to handle requests between two or more parties. These requests are stored in an sqlite file on a server. When any of the parties wants to check if they received any request they simply download the database and filter out the requests which are meant for them. This part is working fine.</p>
  
  <p>However, when it comes to sending a request and upload the modified sqlite file I get a bit confused as I havent done this before. How can I avoid multiple parties trying to update the database at the exact same time and overwriting each-other's updates?</p>
  
  <p>I am not after source code examples, rather just ideas from anyone who has done something similar before. </p>
  
  <p>Thank you</p>