[11:49:12] <Number5> Hello guys, I need your help because I'm still a bit confused about how to use mongo correctly.
[11:49:15] <Number5> I'm working on a project where I have users, where each user can have up to 10 articles (that can be changed later). Those articles can be grouped by categories. The project will contain hundreds of thousands of users, where all of them can have up to 10 articles. My question is, is it wise to embed articles into user model or is it better to have like a separate model of articles with an owner property referring to a user model? I try not to
[11:49:57] <Derick> two collections is going to be a lot more flexible.
[11:50:12] <Derick> I would do that, and then use a tags array in each article to define to which category they belong
[11:50:58] <Number5> Derick, thnx friend. Can you provide me a link about the category technique? An example will help me a lot.
[11:52:40] <Derick> just have a field in each docoument: { _id: ..., author: "Derick", title: "yes!", categories: [ 'food', 'space', 'animals' ] }
[11:53:04] <Derick> then you can do db.colname.find( { categories: 'space' }) to find all space articles
[11:58:37] <Number5> Derick, thank you very much my friend. I appreciate your help :)