Book Review: The Little Mongo DB Schema Design Book
Tags: bookreview, mongodb, schemadesign
Published: 2017-12-26 23:59:55

---
title: "Book Review: The Little Mongo DB Schema Design Book"
published: true
tags: Book Review,MongoDB,schema design
canonical_url: https://www.kenwalger.com/blog/nosql/mongodb/little-schema-design-book/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/9izqzo8gqt98kzixws9b.png
---

I mentioned in a previous post on [Schema Design](https://dev.to/kenwalger/schema-design-considerations-in-mongodb-47f) I mentioned a book on the subject and that I hadn’t, at the time, read it. After hearing&nbsp;_The Little Mongo DB Schema Design Book_&nbsp;by&nbsp;[Christian Kvalheim](https://twitter.com/christkv?lang=en) mentioned elsewhere I thought I would see what it was all about. The [book](https://aax-us-east.amazon-adsystem.com/x/c/Qnwu5hz2NZPU0DZHkDbEC6YAAAFfby8Z2AEAAAFKAQSLJxc/https://www.amazon.com/gp/product/1517394023/ref=as_at/?imprToken=fwe4Y-sw2zFGzrMEIPn2iQ&slotNum=3&ie=UTF8&camp=1789&creative=9325&creativeASIN=1517394023&linkCode=w61&tag=kenwalgersite-20&linkId=a291d83c039ed46dd7dd7d9828ad663f) was published in May of 2015. Even though it is a bit old, the coverage of schema design is still relevant.

[![The Little Mongo DB Schema Design Book](https://i0.wp.com/www.kenwalger.com/blog/wp-content/uploads/2017/12/51jagZYO6fL.jpg?resize=243%2C300&ssl=1)](https://aax-us-east.amazon-adsystem.com/x/c/Qnwu5hz2NZPU0DZHkDbEC6YAAAFfby8Z2AEAAAFKAQSLJxc/https://www.amazon.com/gp/product/1517394023/ref=as_at/?imprToken=fwe4Y-sw2zFGzrMEIPn2iQ&slotNum=3&ie=UTF8&camp=1789&creative=9325&creativeASIN=1517394023&linkCode=w61&tag=kenwalgersite-20&linkId=a291d83c039ed46dd7dd7d9828ad663f)

### MongoDB Overview

Kvalheim starts off the book with a quick introduction to [MongoDB](https://www.mongodb.com) 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.

Kvalheim moves on from there to cover an overview of storage engines available in MongoDB. Specifically the [MMAP](https://docs.mongodb.com/manual/core/mmapv1/) and [WiredTiger](https://docs.mongodb.com/manual/core/wiredtiger/) 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.

After the discussion on storage engines, we are provided with information [indexes](https://www.kenwalger.com/blog/nosql/mongodb/indexing-mongodb/) and [sharding](https://www.kenwalger.com/blog/nosql/mongodb-horizontal-scaling-sharding/) concepts before diving into specifics about schema design itself.

### Schema Design Patterns

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.

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:

- Time Series
- Account Transactions
- Internationalization
- Shopping Carts
- Reservations

In total eleven distinct design concepts are explored.

### Improvements

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&nbsp;_after_ 3.2 I found the discussions of the MMAP storage engine to be less relevant than they were in 2015.

There were a few type-setting issues in this schema design book but I didn’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.

### Wrap Up on the Schema Design Book

Overall, I found this book to be a great resource for schema design. Definitely an excellent addition to one’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. [Document validation](https://www.mongodb.com/blog/post/document-validation-part-1-adding-just-the-right-amount-of-control-over-your-documents) was introduced in version 3.2. Version 3.6 extended the validation process with [schema validation](https://dev.to/kenwalger/schema-validation-in-mongodb-36-99d).

* * *

Follow me on Twitter [@kenwalger](https://www.twitter.com/kenwalger) to get the latest updates on my postings. Or better yet, sign up for the email list to get updates in your mailbox!

There are a few MongoDB specific terms in this post. I created a [MongoDB Dictionary](https://www.echoskillstore.com/MongoDB-Dictionary/45103) skill for the [Amazon Echo](https://www.amazon.com/gp/product/B01DFKC2SO/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B01DFKC2SO&linkCode=as2&tag=kenwalgersite-20&linkId=f9e513223de2525a72b95cf9561db55b)&nbsp;line of products. Check it out and you can say “Alexa, ask MongoDB for the definition of a&nbsp;document?” and get a helpful response.

[![Facebook](https://i1.wp.com/www.kenwalger.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/facebook.png?resize=48%2C48&ssl=1 "Share on Facebook")](http://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F&t=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book&s=100&p%5Burl%5D=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F&p%5Bimages%5D%5B0%5D=https%3A%2F%2Fi2.wp.com%2Fwww.kenwalger.com%2Fblog%2Fwp-content%2Fuploads%2F2017%2F07%2Fbook-review-feature-e1500582259806.png%3Ffit%3D125%252C125%26ssl%3D1&p%5Btitle%5D=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book "Share on Facebook")[![twitter](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&ssl=1 "Share on Twitter")](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F&text=Hey%20check%20this%20out "Share on Twitter")[![google_plus](https://i1.wp.com/www.kenwalger.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/google_plus.png?resize=48%2C48&ssl=1 "Share on Google+")](https://plus.google.com/share?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F "Share on Google+")[![reddit](https://i1.wp.com/www.kenwalger.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/reddit.png?resize=48%2C48&ssl=1 "Share on Reddit")](http://www.reddit.com/submit?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F&title=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book "Share on Reddit")[![linkedin](https://i2.wp.com/www.kenwalger.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/linkedin.png?resize=48%2C48&ssl=1 "Share on Linkedin")](http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F&title=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book "Share on Linkedin")[![mail](https://i2.wp.com/www.kenwalger.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/mail.png?resize=48%2C48&ssl=1 "Share by email")](mailto:?subject=Book%20Review%3A%20The%20Little%20Mongo%20DB%20Schema%20Design%20Book&body=Hey%20check%20this%20out:%20https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fnosql%2Fmongodb%2Flittle-schema-design-book%2F "Share by email")

The post [Book Review: The Little Mongo DB Schema Design Book](https://www.kenwalger.com/blog/nosql/mongodb/little-schema-design-book/) appeared first on [Blog of Ken W. Alger](https://www.kenwalger.com/blog).