Where to store large and permanent offline data

Thx!

I will revert to native File. and made a small switcher in the provider to Storage so I can test in the browser (although Chrome does support file write, I understood)

Regards
Tom

You could try pouchdb with sqlite as backend storage ā€¦ super simple to integrate into an Ionic app.

Thatā€™s a very good question, I am also in initial stages of offline dictionary app. I didnā€™t considered the storage of the data yet. If the sql solution didnā€™t work I am planning to split up the data in different json. Donā€™t know how will it go.

1 Like

From the time I asked this question, I have checked other likely questions and answers. I have resolved and have started saving my static data in JSON files. Itā€™s been going well. :slightly_smiling_face: after reading a few articles I have structured my JSON files in such a way that I can fetch data as needed per app interface.
I recommend making wider searches, you will definitely find helpful articles and code samples to help u with Using JSON data in ur ionic project

can you explaine more please, Thanks

I think that if you use IonicStorage directly, you can store JSON structures under a key. This can be useful for certain scenarios. But if you have to alter the data of those structures frequently, it is better to use sqlite directly, adding the items with their relationships and being able to call SQLite queries.

I havent found a good way to manage a lot of data, directly, with ionic storage and JSON. Whenever you write, under a key,

let data = [2,4,8,6,9,2]

storage.set(ā€œtestā€, data)

If you want to modify that array, e.g, add one item, you need to load the key, modify the array and save it again. Which, whith a small array, it is not a problem. But if you are handling huge arrays or objects nested into other arrays/objectsā€¦ it can be very slow to perform operations.

Unless someone tells me that I am wrong (and I would love to, because I would prefer a simpler way to access/manipulate data than with sqlite calls).

I am using file plugin and my JSON file contains 70k records while storing data into file its taking more memory space in device and I am creating this file inside application storage root directory so that my app is getting slow so please suggest me what to do to get out of this problem so that my app will run smoothly.

Hey Did someone overcome in this, please help???

There isnā€™t a single magic answer here, although the march of time and progress means that limitations today are not nearly as constricting as they were when this thread was first posted.

Relevant information:

  • How much data are we talking about?
  • What is it? Sound, video, still images, 400-page PDFs?
  • Why does it need to be stored on the device?
  • How does it need to be queried and fetched?
  • Can it be logically ā€œatomizedā€ in terms of an easily-defined smallest unit?
  • How big is an atom and what does it represent?
  • Under what scenarios does the data get modified?
  • Does it ever expire or otherwise get pruned?
  • How do additions occur?
  • Does it need to be shared or transported across a network?
  • How is it presented?

I have the JSON data which I want to b store and its about to 20MB and its size will increase. I want to store it for offline uses. Any other way if you can suggest me to store long size of JSON data for offline uses? Thanks!!

Thatā€™s one question. Ten more to go.