MongoDB Structure for message app

后端 未结 4 655
误落风尘
误落风尘 2021-01-30 07:18

I am breaking my mind up thinking about a good document structure for handling a message app.

I basically need three (or four) types of objects:

  1. The user (
4条回答
  •  梦谈多话
    2021-01-30 07:48

    Your question is really one of schema design. I suggest taking a look at this page on MongoDB schema design to get a sense of the choices and trade-offs: http://www.mongodb.org/display/DOCS/Schema+Design

    In addition, you should probably review the links in the 'See Also' section of that document. I especially recommend the video presentations.

    Finally, you should probably take a look at this document for a discussion of the three possible schemas for a messaging/commenting database, including the trade-offs for each design: http://docs.mongodb.org/manual/use-cases/storing-comments/

提交回复
热议问题