I am building a read-only iOS application that will ship with a default SQLite data store with the most-current data at the time but because new data will be added every day and the older rows might quite possibly get updated, the data residing on the app will need to be updated frequently (once a day). The initial SQLite data store, that will be bundled with the app initially, is around 3.6 MB, with each row weighing about 9.6KB.
I wrote a web service that the app will connect to in order to get any data updates. Updates will either be in JSON or a location where the app can get a fresh SQLite data file.
My question
What’s best?
1) Doing a series of daily INSERTS/UPDATES to the existing SQLite data store, residing on the app via Core Data
or
2) Grabbing a fresh copy of the newest SQLite data store remotely?
In the latter scenario, I would only do a SQLite replace if the app data was not current or there was some update to an older row (very unusual)
I would download the new data and update the application DB vs downloading a new DB. Your initial DB ships with ~3500 rows of data. You’ll be downloading way less data per update by only sending the new rows. I would timestamp your updates so when the app requests an update the web service can send only the data needed. You can also have your web service send updates for older rows if the data changes.