Should documents be split in mongoDB?

  mongodb, question

For example, an article is followed by many comments. mongo integrates the document and all comments of the document into one document.

However, if in the user’s personal center, all comments of the user are listed according to the chronological order of the comments, and all comments of the user are scattered in a lot of different articles, is it necessary to query all comments of all articles in the article collection according to the method of mongo, and check whether all comments of all articles belong to this user, and all comments belonging to this user are taken out, is mongo supposed to do so? If not, is there any better way to handle this demand?

If comments are placed in this document of the article, if there are too many comments in the article, then the document of the article will be very large. Is this really good?

Without the support of relational models, MongoDB’s model takes meeting the needs as its primary objective. There is no best one to say, only one that is most suitable for you to use. When using, put down the rules of the relational model first, regardless of redundancy and paradigm. As long as your application can work efficiently, it is a good model. Then make some trade-offs between different models and choose one that is best for you.