官术网_书友最值得收藏!

MongoDB schema design

In contrast to relational databases, in MongoDB we have to base our modeling on our application-specific data access patterns. Finding out the questions that our users will have is paramount to designing our entities. In contrast to an RDBMS, data duplication and denormalization are used far more frequently and with solid reason.

The document model that MongoDB uses means that every document can hold substantially more or less information than the next one, even within the same collection. Coupled with rich and detailed queries being possible in MongoDB in the embedded document level, this means that we are free to design our documents in any way that we want. When we know our data access patterns we can estimate which fields need to be embedded and which can be split out to different collections.

主站蜘蛛池模板: 玛沁县| 荃湾区| 虞城县| 兴安盟| 洪泽县| 广灵县| 高邮市| 宜川县| 治多县| 高台县| 贺州市| 鲁山县| 曲靖市| 新丰县| 伊金霍洛旗| 东至县| 城市| 万州区| 手游| 桃园县| 荆门市| 张北县| 磴口县| 仁怀市| 武乡县| 郸城县| 大荔县| 民县| 塘沽区| 烟台市| 江川县| 台中县| 凤城市| 巴南区| 富民县| 青川县| 治多县| 乐清市| 阳西县| 萨嘎县| 仁怀市|