Which is the better way to create relationships between users follow group … we need to create a pivot table or collection . Or we need to save groups objectId save in users object in an array ?
Hi @Arsalan_Ahmed ,
Welcome to MongoDB Community.
It really depnads on the use case and the application queries and write patterns.
I suggest to read the following blogs:
- A Summary of Schema Design Anti-Patterns and How to Spot Them
- MongoDB Schema Design Best Practices
- Building with Patterns: A Summary | MongoDB Blog
Maybe you can tell us more about the application and the access pattern.