SQLight or file

Hi there,

I’m thinking about the strategy for my app. I need to store some data and was thinking about either SQLight or File. Are there any cons to use File with JSON data in it to store and retrieve data? What are the advantages of those two strategies? What would you recommend?

Thank you.

Kin reagards,
Olga

I would recommend ionic-storage over both of those options.

Hmm, they said that you can’t run queries with Storage… I have a calendar with some info for each day, that info should be shown on the separate page for each day, which mean I would need some kind of queries for specific data.

Any suggestions?)

May be you could retrieve the whole data from the database, and then filter the data (on your tap/click function) to send what you need on the next page ?

1 Like

I guess it depends on the details of your application, but given just what you’ve described here, it would still be possible to use ionic-storage. You could just use the date as a key and the events of that date as the value. I don’t necessarily see a compelling need for SQL here.

1 Like