How about using one database, and having a column that tells you if a particular data item (row) came prepackaged, or added / edited by the user?

This could work if your database schema is not too complicated.

-- Kostya

25.07.2011 23:31, Federico Paolinelli пишет:
Hi all, hope somebody can help me with the issue I am having while finishing my app.

At the moment my app relies on a sqlite db to store / give back some kind of data. The user can of course add / delete rows from the db, and I thought it would have been nice to provide some stuff pre installed (it's full of examples on how to ship a pre built sqllite file). I am now thinking that, if I just provide a pre installed db, the user's new data will be mixed the pre installed one.

Now, what I'd really like to do is an easy way to update the data between a release and another without wiping the user's own data out. If I just overwrite the .db file, I will loose the user's own data.

I thought a possible solution would be to have two separates sqllite files, one with my pre-installed stuff (that I can update from release to release), and one with the data filled by the user (that will survive between updates). I can then use a merge cursor to display the data as if it were from one single db, but it sounds a bit tricky.

Do you guys have some other way to achieve this result?

Thanks in advance,

Federico
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to