0

I have a firestore document structure which looks like this:

Firestore Document Structure

I have two pages in my app, recipe list and recipe detail. In Recipe List page, I am accessing this document to get the name and picture. Then when a user clicks on a particular dish, I pass the name and picture as parameters to the dish details page. Now, in dish details page, I am once again querying this same document to get the ingredients and procedure.

My question is, in terms of performance, is it better to query a nested document like this or create a separate collection and documents for ingredient and procedures?

Please let me know.

mcfred
  • 1,183
  • 2
  • 29
  • 68
  • Possible duplicate of [What is denormalization in Firebase Cloud Firestore?](https://stackoverflow.com/questions/54258303/what-is-denormalization-in-firebase-cloud-firestore) – Alex Mamo Jan 25 '19 at 15:15
  • Please check the possible duplicate, it answeres your question regarding the way you can sctructure your data and what are the benefits. – Alex Mamo Jan 25 '19 at 15:16

0 Answers0