I’m working on an Android application that will come with lots of data. I’d have expected to just distribute the SQLite database, but it’s clear from researching this that the database can be included, but must be copied from raw to data, which if there’s a good few MB of data will take up space needlessly. For my app the data is all text/numeric/date, and in a relational database would normally take up four tables. So pretty simple, but having two copies of it seems v wasteful.
The options I see are:
- Tolerate the data being duplicated (it pains me)
- On installation the app downloads the data over HTTP (I’d then have a potential challenge with the load), probably Google App Engine.
Any other solutions worth considering?
I was confronted to the same kind of situation: I am writing an app which has to access – locally – a database containing mainly text and weighing more than 20MB (7MB zip compressed).
The best solution in my opinion for this kind of problem is to download the zipped compiled database on first execution of the app.
The advantages of this solution:
One last thing: I don’t recommend including a CSV or XML and populate the database from it on first run. The reason being this would be very SLOW, and this kind of processing is not supposed to be done by every client.