Home > Back-end >  Which database should I use for my flutter app using lots of images?
Which database should I use for my flutter app using lots of images?

Time:09-18

I want to build a flutter app which focuses on learning plant names with the help of a lot of pictures. In total there will be 600-800 pictures.

  1. question: Do I store these pictures all in the app or in a database?

From what I read so far I guess the app would be too big if I store all these pictures in the app.

  1. question: Which database should I use for storing such an amount of pictures?

I want to give the possibility to store a lection/course (containing 30-40 pictures) locally on the phone to be able to learn without internet connection.

  1. question: Which database should I use for that?

CodePudding user response:

Question #1: Do I store these pictures all in the app or in a database?

You should not store all the images in your app. Use the Cloud Storage for Firebase service to store your pictures and download them to your app as desired.

Question #2: Which database should I use for storing such an amount of pictures?

You should use Cloud Storage for Firebase to store your pictures: "Cloud Storage for Firebase is built for app developers who need to store and serve user-generated content, such as photos or videos."

Question #3: I want to give the possibility to store a section/course (containing 30-40 pictures) locally on the phone to be able to learn without internet connection. Which database should I use for that?

You can save these pictures locally as explained here in the Firebase doc: "The writeToFile() method downloads a file directly to a local device. Use this if your users want to have access to the file while offline."

CodePudding user response:

  1. If in a database, get pic to many times, and much more than the free limit of database , we will prefer pic in app than in database. But in app will never consider the cost, just keep the develop account. Maybe, a pic could compress down to 50kb each, and the app will not too big to download.

  2. mongodb google-could amazon ... all database on the market can serve you.

  3. above dbs are good. the more resourses on net, the better envirnment we like.

  • Related