I essentially want to show a list of jobs and the companies that they are associated with within a single list with firestore
My current DB set-up looks like this.
So if I want to show the job description alongside the company details I currently have two options
- Copy the relevant company details to each job post
Which would make me update every single job post every time the parent data changes.
- For each subcollection query I do an additional query to get the parent data info.
Which feels a lot cleaner but could end up a lot more expensive, since the job list is the data that will be retrieved the most often
What DB structure would be the most optimal in this scenario?
Thanks!