For groups with multiple users, this would give us the possibility of checking who participated in the group at what time. The complete thread for a user who changes groups during the same session can be tracked through the follows property.
This assumes that a Group record will exist even for a User without any teacher.
MongoDB prefers documents which do not constantly grow. A separate doc for each user connection would be better for performance:
For groups with multiple users, this would give us the possibility of checking who participated in the group at what time. The complete thread for a user who changes groups during the same session can be tracked through the
follows
property.This assumes that a Group record will exist even for a User without any teacher.