Unanswered: Local Data Base for Sencha Touch 2 app
I' m doing an app which needs a local database. This database will have 5 tables and with less than 100 rows each. I need this database to stay with the data when the user end the app and start it again.
I'm having a lot of questions about this, I found that Phonegap has a Storage plugin (http://docs.phonegap.com/en/1.0.0/ph...d.html#Storage). Is this good? Is there any other options?
- how can I match a ST2 Store with this local database?
- In case I want to update the app, is this database going to delete when I update the app? I'm talking about a new version of the iPhone and Android app. I need that the db stays as the last version because the user can update the data.
- When I update the app, probably I would need to add new rows to some tables. Is this going to be able?
I'll appreciate your answers, I'm a little lost with this problem.
Sencha Premium Member
I know this is a bit late for an answer, but I am using an ST2 SQLite proxy by shepsii. It can be found on the forums if you search, and is also on github. To answer your question about persistent data, it seems that when the app process is "killed" the database is deleted as it is only a part of a living UIWebview if you use PhoneGap. For your implementation I feel it would be better to store data on a remote server to be sure that it is persistent in all situations. A local DB should really only be used for an Offline situation or as a backup so that users can access data even when they do not have an internet connection.
Tags for this Thread