With firebase firestore, How does it work in social networking kind of applications. Say I have an event which is attended by 50000 users. If I want to see the the users who are attending, I will query my collection lets say 50 at a time and get the user IDs. To get the name and profile picture of all these 50 users, now I need to make 50 queries to the users collection. Lets say, I keep the profile pic and name of every user in events collection so that I don't have to query users collection, but if a user changes name/profile picture, I need to go update all the collections where this profile pic and name are saved to keep information up to date otherwise the application will show one pic at one place and another pic at another place. In Oracle, I can join two tables and can get it or I can use the in operator as a single query on users table. In MongoDB, I can fetch all 50 users in one query using the in operator on users collection. How do I get around this using cloud Firestore?
Asked
Active
Viewed 1,336 times
1
-
There is no support for server-side joins in Cloud Firestore at the moment. Nor is there a `SELECT * FROM collection WHERE id IN (1,2,3)`. Also see Sam's answer here: https://stackoverflow.com/a/46773341/209103 – Frank van Puffelen Feb 09 '18 at 04:35