Relationship between users and join groups

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:

Maybe you can tell us more about the application and the access pattern.

Best regards,
Pavel