progy85
progy85

Reputation: 31

What is best way to store large data in local for iOS/Android

I'm working on an app and I have tried to use local storage but I'm not sure if it will be OK for my project. I need to store really large data every second in my local database, and at the end of the day send to my server. This can be large data because every second write my GPS coordinates.

What is best: SQLite, local storage or websql?

I work using cordova.

I appreciate for your help.

Regards

Upvotes: 0

Views: 1385

Answers (3)

Ben
Ben

Reputation: 315

I am an Android developer so this is how it works in Android :

Shared Preferences - simple key/value pairs specific to your application. This is probably the closest to WebStorage - only for small amount of data.

Internal Storage - read/write files(only the app can access it)

External Storage - SD card file storage(app + other apps including the user) can access it).

Databases (SQLite) - better for large amounts of structured data

Network - obviously, you can store/retrieve data remotely if needed (like Firebase).

What would I choose? if data is structured then I would choose SQLite.

More detailed information : https://developer.android.com/training/data-storage

Upvotes: 1

Sky Shadow
Sky Shadow

Reputation: 324

Yes you can use cordova-sqlite-storage for large data inputs. But I think it is also advisable not to stress your device with so much data in it because mobile is just mobile with so many limitations in terms of hardware. Maybe you can just set a treshold of data size and after reaching it, send it to your server then clear your database.

The point is don't stress you device, use minimum data as much as possible to provide a clean app for the users.

Upvotes: 0

AAAADWBNH
AAAADWBNH

Reputation: 106

cordova-sqlite-storage is Native SQLite component with API based. It will easily handle large data and easy for CRUD operation.

Upvotes: 0

Related Questions