SQLite and Cloud applications

990 Views Asked by At

i was wondering if there is a way to enable cloud features for a SQLite database application.

Should i save the whole database to the cloud each time ? For example when i quit the application is it required to save the whole database to the cloud.

What do you suggest ?

Should i drop SQLite and use another database for cloud programming .

2

There are 2 best solutions below

2
joshOfAllTrades On

iCloud supports SQLite databases.

When properly setup it will only sync change logs instead of the entire database. In theory it's pretty nice. I haven't however had the best of luck using it yet, it seems to be a little too buggy to actually use in ios 5, hopefully it's better in 6.

0
openmobster On

To be most efficient you could manage a changelog of objects that are modified by the app. Then when its time to sync (while closing the app for instance), you can make operational requests to the Cloud. For add and update you can send the entire object, while for delete just the oid should suffice.

This is a very simple sync scenario. Things can get complicated fast if you are looking to send changes that happen in the Cloud down to the device. That is a scenario for a different thread.

Based on your question, you just need to sync from the device to the Cloud.