Reputation: 1743
I have read some information but i wanted to clear things about databases and phonegap. I am interested in developing a phonegap/cordova app for android/ios with a database.
What database should i use a database like Web Sql or some other solutions like http://www.taffydb.com? I do not understand one thing about Web Sql. Is it possible to save the data and reopen them when you open the app for example 4th time or is the database created every time from scratch?
Thanks
Upvotes: 0
Views: 255
Reputation: 1413
It would be better if you use the SQL Lite Database
since is light weighted database and also you can find how to use it in the Apache Cordova Documentation too http://cordova.apache.org/docs/en/2.9.0/cordova_storage_storage.md.html
Upvotes: 2
Reputation: 5178
You can use Web SQL, and information in database will stay at the same place after application's reopen.
The only ways to delete database are by doing it programmatically, or by clearing application data in settings.
Docs about it: http://cordova.apache.org/docs/en/2.9.0/cordova_storage_storage.md.html
You can also use ORM library. Personally, i used Persistensejs (https://github.com/zefhemel/persistencejs) for the previous two projects.
Upvotes: 1