MongoDB in Action

Kyle Banker

Publisher: Manning, 2012, 287 pages

ISBN: 978-1-935182-87-0

Keywords: Databases

Last modified: Feb. 28, 2013, 2:45 p.m.

Big data can mean big headaches. MongoDB is a document-oriented database designed to be flexible, scalable, and very fast, even with big data loads. It's built for high availability, supports rich, dynamic schemas, and lets you easily distribute data across multiple servers.

MongoDB in Action introduces you to MongoDB and the document-oriented database model. This perfectly paced book provides both the big picture you'll need as a developer and enough low-level detail to satisfy a system engineer. Numerous examples will help you develop confidence in the crucial area of data modeling. You'll also love the deep explanations of each feature, including replication, auto-sharding, and deployment.

  • Indexes, queries, and standard DB operations
  • Map-reduce for custom aggregations and reporting
  • Schema design patterns
  • Deploying for scale and high availability

Written for developers. No MongoDB or NoSQL experience required.

  • Part 1: Getting Started
    1. A database for the modern web
      1. Born in the cloud
      2. MongoDB's key features
        • The document data model
        • Ad hoc queries
        • Secondary indexes
        • Replication
        • Speed and durability
        • Scaling
      3. MongoDB’s core server and tools
        • The core server
        • The JavaScript shell
        • Database drivers
        • Command-line tools
      4. Why MongoDB?
        • MongoDB versus other databases
        • Use cases and production deployments
      5. Tips and limitations
      6. Summary
    2. MongoDB through the JavaScript shell
      1. Diving into the MongoDB shell
        • Starting the shell
        • Inserts and queries
        • Updating documents
        • Deleting data
      2. Creating and querying with indexes
        • Creating a large collection
        • Indexing and explain()
      3. Basic administration
        • Getting database information
        • How commands work
      4. Getting help
      5. Summary
    3. Writing programs using MongoDB
      1. MongoDB through the Ruby lens
        • Installing and connecting
        • Inserting documents in Ruby
        • Queries and cursors
        • Updates and deletes
        • Database commands
      2. How the drivers work
        • Object ID generation
        • BSON
        • Over the network
      3. Building a simple application
        • Setting up
        • Gathering data
        • Viewing the archive
      4. Summary
  • Part 2: Application Development in MongoDB
    1. Document-oriented data
      1. Principles of schema design
      2. Designing an e-commerce data model
        • Products and categories
        • Users and orders
        • Reviews
      3. Nuts and bolts: on databases, collections, and documents
        • Databases
        • Collections
        • Documents and insertion
      4. Summary
    2. Queries and aggregation
      1. E-commerce queries
        • Products, categories, and reviews
        • Users and orders
      2. MongoDB’s query language
        • Query selectors
        • Query options
      3. Aggregating orders
        • Grouping reviews by user
        • Map-reduce for orders by region
      4. Aggregation in detail
        • Maxima and minima
        • Distinct
        • Group
        • Map-reduce
      5. Summary
    3. Updates, atomic operations, and deletes
      1. A brief tour of document updates
      2. E-commerce updates
        • Products and categories
        • Reviews
        • Orders
      3. Atomic document processing
        • Order state transitions
        • Inventory management
      4. Nuts and bolts: MongoDB updates and deletes
        • Update types and options
        • Update operators
        • The findAndModify command
        • Deletes
        • Concurrency, atomicity, and isolation
        • Update performance notes
      5. Summary
  • Part 3: MongoDB Mastery
    1. Indexing and query optimization
      1. Indexing theory
        • A thought experiment
        • Core indexing concepts
        • B-trees
      2. Indexing in practice
        • Index types
        • Index administration
      3. Query optimization
        • Identifying slow queries
        • Examining slow queries
        • Query patterns
      4. Summary
    2. Replication
      1. Replication overview
        • Why replication matters
        • Replication use cases
      2. Replica sets
        • Setup
        • How replication works
        • Administration
      3. Master-slave replication
      4. Drivers and replication
        • Connections and failover
        • Write concern
        • Read scaling
        • Tagging
      5. Summary
    3. Sharding
      1. Sharding overview
        • What sharding is
        • How sharding works
      2. A sample shard cluster
        • Setup
        • Writing to a sharded cluster
      3. Querying and indexing a shard cluster
        • Shard query types
        • Indexing
      4. Choosing a shard key
        • Ineffective shard keys
        • Ideal shard keys
      5. Sharding in production
        • Deployment and configuration
        • Administration
      6. Summary
    4. Deployment and administration
      1. Deployment
        • Deployment environment
        • Server configuration
        • Data imports and exports
        • Security
      2. Monitoring and diagnostics
        • Logging
        • Monitoring tools
        • External monitoring applications
        • Diagnostic tools (mongosniff, bsondump)
      3. Maintenance
        • Backups and recovery
        • Compaction and repair
        • Upgrading
      4. Performance troubleshooting
        • Check indexes and queries for efficiency
        • Add RAM
        • Increase disk performance
        • Scale horizontally
        • Seek professional assistance
      5. Summary
  • appendix A: Installation
  • appendix B: Design patterns
  • appendix C: Binary data and GridFS
  • appendix D: MongoDB in PHP, Java, and C++
  • appendix E: Spatial indexing

Reviews

MongoDB in Action

Reviewed by Roland Buresund

Very Good ******** (8 out of 10)

Last modified: Feb. 28, 2013, 12:47 a.m.

I started off with low expectations, but was pleasantly surprised by the no-nonsense style of writing, that took time off to explain the most important topics

It gets minus-marks for a lot of errors in the code-examples, and the use of Ruby (which you really need to know to appreciate the book, along with JavaScript). But I can still recommend it to anyone that wants to learn MongoDB as a NoSQL-database

Probably one of the best books on the subject at the time of this review.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required