Question

I would say that WebSQL is a great option for databases on Mobile Devices. It support "large" amout of data (compared to localStorage) and allows to operates locally.

Actually, I'm developing an app which storages data "locally". It treats data locally through lots of queries and operations in DB, everything usind WebSQL.

I can't see any way to continue my app without WebSQL, as it will be discontinued middle this month.

This is because I use a local table which validates user login (using first-launch-time/manual syncronization with server). (I can say that user and password tables is around 500 rows maximum) This app also is capable to register and delete people (not related as users), this is a huge amount of data, like 10k people informations (address, age, birth, etc...)

There's a lot of routines to check data updates with server when connected to the network. It also sync to serve when new people is registered (when connected).

Now, I see the end of line to continue developing with phonegap using some DB storage. localStorage isn't an option because of amount of data and also it's method to query (it takes a lot with large amount of data) indexedDB isn't present on iOS and Android, so, it's far away for my solution.

Can anyone give (us) some bright light from DB storage in cross-platform development? What can be used to continue my app and not throw it away with WebSQL?

Thanks in advance!

Was it helpful?

Solution

IndexedDB is next generation storage api for browser. But Apple does not agree IndexedDB is better than Web SQL Storage. Due to its large developer usage of WebSQL on iOS and low level API nature of IndexedDB, Apple is likely to stick with WebSQL for many years.

You could either use IndexedDB polyfill, or database abstraction library like my own, ydn-db. I plan to have WebSQL polyfill, but currently it is not yet there. For IndexedDB to that query level of WebSQL, I have to figure out table join, buffered sorting and relational constraint.

OTHER TIPS

IndexedDB, for sure looks as the future of browser storage. Adding another option to above answer is the combination of IndexedDBShim and Jquery-IndexedDB Plugin . I have worked on the similar project as of yours and this combination worked across all modern browsers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top