The Definitive Guide to MongoDB
The Definitive Guide to MongoDB

Authors: David Hows, Eelco Plugge, Peter Membrey, Tim Hawkins
Publisher: APress, 2013
Pages: 308
ISBN: 978-1430258216
Aimed at: programmers who want to learn MongoDB
Rating: 4.5

"A Complete Guide to Dealing with Big Data Using MongoDB". Does it live up to this claim?


This 2nd edition has been updated to cover the changes to MongoDB version 2.4 such as hashed indexes.

The authors start Part 1: MongoDB Basics with a look at the philosophy and ideas behind the creation of MongoDB, and how the design decisions affect the way the database works. JSON is also introduced in this chapter. While the authors are obviously fans of MongoDB and the NoSQL model, they do also mention its drawbacks so you don’t get a completely biased view.

Having told you why MongoDB is a good idea, the authors then move on to how to install it on Linux and Windows, along with the PHP driver and the Python driver.




A MongoDB database consists of collections of documents with indexes to improve performance. The way all this works is the subject of the Chapter 3, including geospatial indexing. Working with data – querying, updating, adding and removing documents – is covered in the next chapter.

By Chapter 5 the authors are on to GridFS, and the way it can be used to locate information within documents. GridFS is the specification used by all the MongoDB drivers, and it overcomes the limit of 16MB per MongoDB document. The idea is that if you have large files that you want to store using MongoDB, they’re stored externally and accessed using GridFS.



Part 2 of the book is dedicated to Developing with MongoDB. There are chapters on developing for MongoDB with PHP and Python, and a chapter on ‘advanced queries’ that looks at text search, the aggregation framework, and MapReduce. The chapter on using PHP is good on identifying where PHPs way of working differs from what would be an ideal match with MongoDB, and how to get around this. The aggregation framework was introduced in MongoDB 2.2, and consists of a set of pipeline operators that you can put together to form sequences of operations on all your data. The first operator performs on all the data, later ones in the pipe work on the output from the earlier operators. The chapter looks at $group, $limit, $match, $sort, $unwind, $project, and $skip.

The third and final part of the book is titled Advanced MongoDB with Big Data. There’s a useful chapter on administering MongoDB, then in-depth chapters on optimization, replication, and sharding. The optimization chapter looks at how to evaluate query performance using the profiler, explain(), and the two together to optimize a query. The section on how MongoDB selects which index to use was interesting, as was the section on using hint() to force the use of a specific index.

The chapter on replication shows how to manage the oplog in terms of setting its size to balance out the needs of being able to synchronize replicas, and what the stats actually mean. The sharding chapter starts with a good explanation of why you need to shard, then goes on to analyze different sharding options, including the use of MongoDB’s balancer, the use of hashed shard keys, and tag sharding. This lets you specify which data should be located in a particular shard. I’d have liked longer chapters on both replication and sharding, but what is there is good.

The authors have done a good job on this book. The high level explanations really make sense, and the technical material is clear. I’d still want more on the more advanced topics, but it’s a good read.


Related Reviews 

MongoDB the Definitive Guide (O'Reilly)

MongoDB Applied Design Patterns (O'Reilly)

MongoDB in Action (Manning)



User Story Mapping

Author: Jeff Patton
Publisher: O'Reilly
Pages: 324
ISBN: 9781491904909
Print: 1491904909
Kindle: B00NF07FHS
Audience: Agile practitioners
Rating:  4
Reviewer: Alex Armstrong

Subtitled "Discover the Whole Story, Build the Right Product",  does this book provide practical help?

Programming Beyond Practices

Author: Greg Brown
Publisher: O'Reilly
Pages: 132
ISBN: 978-1491943823
Print: 1491943823
Kindle: B01LYRCGA8
Audience: Developers
Rating: 4
Reviewer: Kay Ewbank

Most programmers focus on writing the best possible code, but this book shows the importance of other aspects of development work.

More Reviews


Last Updated ( Wednesday, 16 July 2014 )

RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.