3

I am trying to store and fetch the nested JSON object in db. My json will look like this :

{
  "itemID": "12841",
  "rfidTag": "IRYS009",
  "itemERPKey": null,
  "skuNumber": "IRYS009",
  "designNumber": "FR001",
  "imageName": "FR001",
  "itemStatus": "InStock",
  "semiFinished": [
    {
      "sfID": "775",
      "sfERPKey": "IRYS009",
      "sfType": "dia"
    },
    {
      "sfID": "776",
      "sfERPKey": "IRYS009",
      "sfType": "ruby"
    }
  ],
  "miscellaneous": [
    {
      "miscellaneousID": "459",
      "miscellaneousERPKey": "IRYS009",
      "miscellaneousType": "dia"
    },
    {
      "miscellaneousID": "460",
      "miscellaneousERPKey": "IRYS009",
      "miscellaneousType": "ruby"
    }
  ]
}

I first thought of using no SQL solution Sembast but got to know there is a performance issue with large data set. I need to store more than 60000 records. I also thought of using REALM but no stable package of Realm is available for Flutter.

I then used moor but in this too insertion and fetching of such complex objects are not easy.

Please let me know any possible solution available in flutter for storing and fetching complex JSON objects efficiently and also with 60000 records.

3
  • I have also tried moor but there is no clear documentation of storing and retrieving such nested json objects in moor. Commented Jan 12, 2020 at 16:57
  • @Chaitali Jain 60000 records isn't large data set. For NoSQL engines like MongoDB large data set (when you can see a performance issue) is 400M records (400.000.000). So don't worry about performance with your data set and use NoSQL engine. Commented Jan 12, 2020 at 17:23
  • Are you trying to store the whole thing as a single string, or decompose it into some normalized table schema? Commented Jan 13, 2020 at 3:10

1 Answer 1

1

You can check out Hive NoSQL Database with flutter, I really believe it encompasses what you are trying to achieve, here is a link to their official documentation https://pub.dev/packages/hive

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.