I have a firestore db but right now it only has a collection of users, with the documents named as the unique user's email they signed up with and then inside the document is the other info.
For the use of displaying the user's profile or editing the profile its working fine. However now that i am starting to add more functionality i'm wondering what is the best way to structure my data. For instance i created a collection called requests and basically a user can request money from some people or they owe some other users money.
So how do i connect the requests collection to the users collection? Should i include a field in the user's document called requests and have a list of all the requests via their document id's? Is this plausible or efficient? Is there a way where i can in my code loop through my list of requests inside the user document and then access the info inside the requests collection by searching for the specific document id? Any ideas as to which is the most efficient way to structure this code and how to access the info across collections that is specific to the user? This issue applies to any other functionality i add for example a chat system.