title: Best practices in syncing data
body: <p><strong>Context</strong></p>
  
  <p>A mobile application can add/edit/delete a customer in it's own offline database.
  A web application can also add/edit/delete a customer in the master database on a web server.
  The mobile application will try to sync it's database with the master database every X hours, provided it has an internet connection available.</p>
  
  <p><strong>Case</strong></p>
  
  <ol>
  <li>Mobile application edits customer A in its offline database</li>
  <li>Web application edits customer A in the master database</li>
  <li>Mobile application gains access to internet and syncs its offline database with the master database.</li>
  </ol>
  
  <p><strong>Question</strong></p>
  
  <p>How should the system handle the two versions of the data? The version of the Mobile application is older than the version of the Web application but overwriting everything edited by the mobile application with the data from the web application seems not very user friendly.</p>
  
  <p>I'm looking for information/best practices on how to solve known versioning/syncing problems with data. I'm not interested in technologies who can assist in this. I want to understand the solutions before jumping blindly into a promising versioning tool.</p>