简体   繁体   中英

How to add a large amount of data to firebase

I'm writing my own fitness apps where users can create their own workout. At the moment I save everything on firebase (user name, user age,...) but I do not know how I could enter the hundreds of exercises at firebase. Creating for every exercice a new node does not seem to be the best solution. How/where could I create a database with all fitness exercises that you can easily reach and retrieve? I thought that I could save them all on the phone's storage space so that the user does not have to be connected to the wifi?

It should look something like:

exerciceID
- exercice Name
- description
- image1
- image2  

Thanks for every help!

Well, you gonna have to add every exercise if you want it on the database. So if your exercise is public and everyone can access it, I suggest like this

 -exercise(colection)
         -exercise_1(random number)->this is a document
                     +exercise name
                     +description
                     +image[]
                            +image1
                            +image2
          -exercise_2
                     +name
                     +description
                     +image[]

Sorry for my bad illustration. This is the simplest data model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM