MongoDB best practice - array vs. new documents -
i have system users , competitions in mongodb. want users able sign competitions. best practice:
to have third collection named "competitionsignups" signups saved in separate documents - references both competition , user.
to have array in each competition document references users has signed it.
a third solution??
edit: primary operations are:
- select competitions user signed for
- select users in competition
- select users signed given competition, , hasn't used account given time period. can unregistered competition. (the user documents has parameter named "last_use_date").
Comments
Post a Comment