Other Languages - Which Type of Databases Support by Phone Gap

Asked By balaji mogadali on 01-Oct-11 08:13 AM
hi frds

which type of databases support by phone Gap

Pls Help 
Suchit shah replied to balaji mogadali on 01-Oct-11 08:30 AM
Database (the Sqlite database) is baked right into Webkit (and Safari), though you do get some added functionality from Phonegap (the ability to pre-populate a Database). But you can just develop in HTML5 and Javascript to start. Apple provides a reference for Client Side storage. If you are looking for some sample code to play with, here is a little testbed I came up with to play with HTML5 databases. Note: when I say HTML5 databases, I mean Webkit as Mozilla is skeptical about adding an SQL database to HTML5 at all.
dipa ahuja replied to balaji mogadali on 01-Oct-11 08:32 AM
PhoneGap supports a number of different mobile platforms, including:

Android
iPhone
Blackberry
Symbian
Palm

and for databases it supports 

sqlite
SQL
mySQL etc..

Kirtan Patel replied to balaji mogadali on 01-Oct-11 11:28 AM
Phonegap is Mobile Platform so it supports SQLite which works without any driver etc on mobile devices . 

thanks 
Anoop S replied to balaji mogadali on 01-Oct-11 01:38 PM
Firstly BlackBerry supports three types of persistent storage: there is the MIDP records that are supported on J2ME phones, regular flat-file storage (which you would have to implement yourself completely) and the BlackBerry persistence model. You can only store byte arrays with the first two methods. The last method, the BB persistence model, essentially works like a giant hashtable - you provide a unique key the value you want to store, and you can then access it at a later date using the same key. The neat thing about this last approach is that the value you store can be any Java object, which is pretty useful.

In terms of getting this functionality into PhoneGap, we'd have to look at how the other platforms (iPhone, Android in particular) handle data storage. We want to line the JS API up perfectly across all these platforms, which can be a challenge. With respect to persistent storage, iPhone uses sqlite, and this functionality is built right into WebKit as part of the HTML 5 spec. I think this is the case for Android, too. With that in mind, any support for local/persistent storage, in my mind, would try to follow along with the sqlite approach on iPhone/Android. This would be tricky to implement, especially since the BB persistence model is nowhere near as close in complexity to the sqlite database available on other platforms. We would need to think of a clever way to build an abstraction layer over both persistent storage approaches and then expose the functionality via a JavaScript interface.

two year ago, RIM announced that it was adding Sqlite to the BlackBerry API
refer this for how to use Sqlite
http://www.digitaldogbyte.com/2011/05/12/using-sqlite-with-phonegap-0-9-5-webos/

Radhika roy replied to balaji mogadali on 02-Oct-11 05:37 AM

This is applicable to PhoneGap-webOS 0.9.6 and above.



PhoneGap webOS is a skeleton HP Palm webOS application, along with javascript wrapper libraries, which allow a developer to build an application for a HP Palm webOS phone using web technologies.