title: Android: Updating local database from an online database
body: <p>I have an android application that works as an inventory application to different stores (You can search for any electronic device according to certain specs and find which stores sell it and their location). The application comes with a local database, this database needs to get updated through a soap service to have the latest information about the electronic devices, offers and shops. The soap service will get it's data from another database hosted on the web and that gets updated from different sources through a designated website.</p>
  
  <p>The problem we are facing is that we can't figure out the way to update the local database without having the user downloading the whole "online" DB from the web every time it gets updated as that would be bandwidth consuming an the DB can get as big as few MegaBytes.</p>
  
  <p>We came up with the following solutions:</p>
  
  <ul>
  <li><p>Create Versioned Update Scripts that will have the SQL transactions done on the online DB, the application will download them and run them to update the Local database. <b> The issue with this solution is that if a user doesn't update the application regularly, they will have to download alot of scripts to do the update the next time they are going to update the application, and most likely it will contain a lot of junk scripts (Items get added on an early script, then gets deleted on a later on) </b>.</p></li>
  <li><p>Download the online DB and replace the local one with it. <b>As mentioned above this can be pretty annoying since the DB size might be a few Megabytes.</b></p></li>
  </ul>
  
  <p>Can someone help me with this issue?</p>
  
  <p>TYI</p>