{"id":668,"date":"2017-12-26T11:38:13","date_gmt":"2017-12-26T19:38:13","guid":{"rendered":"https:\/\/www.kenwalger.com\/blog\/?p=668"},"modified":"2017-12-26T11:38:13","modified_gmt":"2017-12-26T19:38:13","slug":"little-schema-design-book","status":"publish","type":"post","link":"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/little-schema-design-book\/","title":{"rendered":"Book Review: The Little Mongo DB Schema Design Book"},"content":{"rendered":"<p>I mentioned in a previous post on <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/schema-design-considerations-mongodb\/\">Schema Design<\/a> I mentioned a book on the subject and that I hadn&#8217;t, at the time, read it. After hearing\u00a0<em>The Little Mongo DB Schema Design Book<\/em>\u00a0by\u00a0<a href=\"https:\/\/twitter.com\/christkv?lang=en\">Christian Kvalheim<\/a> mentioned elsewhere I thought I would see what it was all about. The <a href=\"https:\/\/aax-us-east.amazon-adsystem.com\/x\/c\/Qnwu5hz2NZPU0DZHkDbEC6YAAAFfby8Z2AEAAAFKAQSLJxc\/https:\/\/www.amazon.com\/gp\/product\/1517394023\/ref=as_at\/?imprToken=fwe4Y-sw2zFGzrMEIPn2iQ&amp;slotNum=3&amp;ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1517394023&amp;linkCode=w61&amp;tag=kenwalgersite-20&amp;linkId=a291d83c039ed46dd7dd7d9828ad663f\">book<\/a> was published in May of 2015. Even though it is a bit old, the coverage of schema design is still relevant.<\/p>\n<p><a href=\"https:\/\/aax-us-east.amazon-adsystem.com\/x\/c\/Qnwu5hz2NZPU0DZHkDbEC6YAAAFfby8Z2AEAAAFKAQSLJxc\/https:\/\/www.amazon.com\/gp\/product\/1517394023\/ref=as_at\/?imprToken=fwe4Y-sw2zFGzrMEIPn2iQ&amp;slotNum=3&amp;ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1517394023&amp;linkCode=w61&amp;tag=kenwalgersite-20&amp;linkId=a291d83c039ed46dd7dd7d9828ad663f\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"729\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/little-schema-design-book\/attachment\/51jagzyo6fl\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?fit=405%2C500&amp;ssl=1\" data-orig-size=\"405,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"51jagZYO6fL\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?fit=243%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?fit=405%2C500&amp;ssl=1\" class=\"aligncenter size-medium wp-image-729\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?resize=243%2C300&#038;ssl=1\" alt=\"The Little Mongo DB Schema Design Book\" width=\"243\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?resize=243%2C300&amp;ssl=1 243w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/12\/51jagZYO6fL.jpg?w=405&amp;ssl=1 405w\" sizes=\"auto, (max-width: 243px) 85vw, 243px\" \/><\/a><\/p>\n<h3>MongoDB Overview<\/h3>\n<p>Kvalheim starts off the book with a quick introduction to <a href=\"https:\/\/www.mongodb.com\">MongoDB<\/a> and some basic principles of schema design before moving into some examples of data modeling patterns. I thought his discussion of One-To-One, One-To-Many, and Many-To-Many data models was well done. He used some good examples of blogs and users to explain the concepts in an easy to follow fashion.<\/p>\n<p>Kvalheim moves on from there to cover an overview of storage engines available in MongoDB. Specifically the <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/mmapv1\/\">MMAP<\/a> and <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/wiredtiger\/\">WiredTiger<\/a> storage engines. This provides nice coverage for those using older, pre version 3.2 instances of MongoDB, as well as those who have opted to upgrade to more recent versions. At the time of this writing, version 3.6 is the most current.<\/p>\n<p>After the discussion on storage engines, we are provided with information <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/indexing-mongodb\/\">indexes<\/a> and <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb-horizontal-scaling-sharding\/\">sharding<\/a> concepts before diving into specifics about schema design itself.<\/p>\n<h3>Schema Design Patterns<\/h3>\n<p>Once we move into the design pattern section of the book, Kvalheim does a nice job of breaking each design option down. He follows a consistent format for each pattern discussing the unique aspects of typical data modeling patterns. He showcases their operations and provides recommendations for indexing, scaling, and performance implications.<\/p>\n<p>The examples are done very well and provide some great coverage of a wide variety of use cases for data storage. Some example schema designs covered are:<\/p>\n<ul>\n<li>Time Series<\/li>\n<li>Account Transactions<\/li>\n<li>Internationalization<\/li>\n<li>Shopping Carts<\/li>\n<li>Reservations<\/li>\n<\/ul>\n<p>In total eleven distinct design concepts are explored.<\/p>\n<h3>Improvements<\/h3>\n<p>One of the downsides to print books about technology topics is the speed in which the information changes. There are indeed a lot of installations of MongoDB using versions before version 3.2. Being a user of MongoDB\u00a0<em>after<\/em> 3.2 I found the discussions of the MMAP storage engine to be less relevant than they were in 2015.<\/p>\n<p>There were a few type-setting issues in this schema design book but I didn&#8217;t find those to be too troubling. They generally just required rereading the sentence a time or two to grasp the meaning of the sentence.<\/p>\n<h3>Wrap Up on the Schema Design Book<\/h3>\n<p>Overall, I found this book to be a great resource for schema design. Definitely an excellent addition to one&#8217;s library for application development when using MongoDB as a database. There are some features in post-2015 releases of MongoDB that assist developers and database administrators in schema management as well. <a href=\"https:\/\/www.mongodb.com\/blog\/post\/document-validation-part-1-adding-just-the-right-amount-of-control-over-your-documents\">Document validation<\/a> was introduced in version 3.2. Version 3.6 extended the validation process with <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/schema-validation-mongodb-3-6\/\">schema validation<\/a>.<\/p>\n<hr \/>\n<p>Follow me on Twitter <a href=\"https:\/\/www.twitter.com\/kenwalger\">@kenwalger<\/a> to get the latest updates on my postings. Or better yet, sign up for the email list to get updates in your mailbox!<\/p>\n<p>There are a few MongoDB specific terms in this post. I created a <a href=\"https:\/\/www.echoskillstore.com\/MongoDB-Dictionary\/45103\">MongoDB Dictionary<\/a> skill for the <a href=\"https:\/\/www.amazon.com\/gp\/product\/B01DFKC2SO\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B01DFKC2SO&amp;linkCode=as2&amp;tag=kenwalgersite-20&amp;linkId=f9e513223de2525a72b95cf9561db55b\" rel=\"noopener noreferrer\">Amazon Echo<\/a>\u00a0line of products. Check it out and you can say &#8220;Alexa, ask MongoDB for the definition of a\u00a0document?&#8221; and get a helpful response.<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668&#038;t=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668&#038;p&#091;images&#093;&#091;0&#093;=https%3A%2F%2Fi0.wp.com%2Fwww.kenwalger.com%2Fblog%2Fwp-content%2Fuploads%2F2017%2F07%2Fbook-review-feature-e1500582259806.png%3Ffit%3D125%252C125%26ssl%3D1&#038;p&#091;title&#093;=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/facebook.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668&#038;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/twitter.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668&#038;title=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/reddit.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668&#038;title=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/linkedin.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book&#038;body=Hey%20check%20this%20out:%20https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F668\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/mail.png?resize=48%2C48&#038;ssl=1\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>I mentioned in a previous post on Schema Design I mentioned a book on the subject and that I hadn&#8217;t, at the time, read it. After hearing\u00a0The Little Mongo DB Schema Design Book\u00a0by\u00a0Christian Kvalheim mentioned elsewhere I thought I would see what it was all about. The book was published in May of 2015. Even &hellip; <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/little-schema-design-book\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Book Review: The Little Mongo DB Schema Design Book&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":474,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1170,4],"tags":[785],"yst_prominent_words":[734,1085,99,1175,1176,784,1179,1173,1171,1177,87,782,783,1178,575,580,967,339,1181,1090],"class_list":["post-668","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-book-review","category-mongodb","tag-schema-design","pmpro-has-access"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/07\/book-review-feature-e1500582259806.png?fit=125%2C125&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8lx70-aM","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":3,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions\/732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/media\/474"}],"wp:attachment":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/tags?post=668"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}