Hello there,
since I would like to use Firestore in my next project app, I'm here to ask advices about schema.
My app lets users create their gym training programs and at the moment I built a local database (mobile app) where every program has an array of WEEKS, every week an array of DAYS and every day an array of EXERCISES. This way I can keep track of last training completed and let user continue with the next one.
With this schema in mind, in Firestore should be something like:
Programs (collection)
-Program1 (document)
--Weeks (collection)
---Week1 (document)
----Days (collection)
-----Day1 (document)
------Exercises (collection)
-------Exercise1 (document)
Exercise2
Exercise3
.......
.......
What do you think ?
As an alternative, I could use an object to represent a Program (with its weeks, days and exercises in it): maybe it would result in less read requests when a user wants to see the entire program but the risk is to exceed the max document size allowed.
Many thanks for any suggestion,
Alessandro