What is the best way to structure Firestore and Angular for efficient querying?
When using a JSON Cloud Firestore database, one of the challenges is inserting people and relating them to users.
To optimize query speed and efficiency, it is important to create nodes properly.
Storing all people in a single collection could lead to slow queries, so a more strategic approach is needed.
user1: // display people related to this user
personList:
2 people registered
[{'name': 'person 1'}, {'name': 'person 2'}]
user2: // display people related to this user
personList:
3 people registered
[{'name': 'another person 1'}, {'name': 'another person 2'}, {'name': 'another person 3'}]
When a user like user1 registers 10 people, the system should only show people related to user1.