How does MongoDB help you manage a huMONGOus amount of data collected through your web application? With this authoritative introduction, you'll learn the many advantages of using document-oriented databases, and discover why MongoDB is a reliable, high-performance system that allows for almost infinite horizontal scalability.
Written by engineers from 10gen, the company that develops and supports this open source database, MongoDB: The Definitive Guide provides guidance for database developers, advanced configuration for system administrators, and an overview of the concepts and use cases for other people on your project. Learn how easy it is to handle data as self-contained JSON-style documents, rather than as records in a relational database.
-
Explore ways that document-oriented storage will work for your project
-
Learn how MongoDB’s schema-free data model handles documents, collections, and multiple databases
-
Execute basic write operations, and create complex queries to find data with any criteria
-
Use indexes, aggregation tools, and other advanced query techniques
-
Learn about monitoring, security and authentication, backup and repair, and more
-
Set up master-slave and automatic failover replication in MongoDB
-
Use sharding to scale MongoDB horizontally, and learn how it impacts applications
-
Get example applications written in Java, PHP, Python, and Ruby
About the Authors
Kristina Chodorow, a software engineer at 10gen, is a core contributor to the MongoDB project and has worked on the database server, PHP driver, Perl driver, and many other areas. She’s given talks at conferences around the world, including OSCON, LinuxCon, FOSDEM, and Latinoware.
Mike Dirolf, also a software engineer at 10gen, is the lead maintainer for PyMongo (the MongoDB Python driver), and the former maintainer for the MongoDB Ruby driver. He’s given talks about MongoDB at major conferences around the world.
Table of Contents
Chapter 1 Introduction
-
A Rich Data Model
-
Easy Scaling
-
Tons of Features…
-
…Without Sacrificing Speed
-
Simple Administration
-
But Wait, That’s Not All…
Chapter 2 Getting Started
-
Documents
-
Collections
-
Databases
-
Getting and Starting MongoDB
-
MongoDB Shell
-
Data Types
Chapter 3 Creating, Updating, and Deleting Documents
-
Inserting and Saving Documents
-
Removing Documents
-
Updating Documents
-
The Fastest Write This Side of Mississippi
-
Requests and Connections
Chapter 4 Querying
-
Introduction to find
-
Query Criteria
-
Type-Specific Queries
-
$where Queries
-
Cursors
-
Cursor Internals
Chapter 5 Indexing
-
Introduction to Indexing
-
Unique Indexes
-
Using explain and hint
-
Index Administration
-
Geospatial Indexing
Chapter 6 Aggregation
-
count
-
distinct
-
group
-
MapReduce
Chapter 7 Advanced Topics
-
Database Commands
-
Capped Collections
-
GridFS: Storing Files
-
Server-Side Scripting
-
Database References
Chapter 8 Administration
-
Starting and Stopping MongoDB
-
Monitoring
-
Security and Authentication
-
Backup and Repair
Chapter 9 Replication
-
Master-Slave Replication
-
Replica Sets
-
Performing Operations on a Slave
-
How It Works
-
Administration
Chapter 10 Sharding
-
Introduction to Sharding
-
Autosharding in MongoDB
-
The Key to Sharding: Shard Keys
-
Setting Up Sharding
-
Production Configuration
-
Sharding Administration
Chapter 11 Example Applications
-
Chemical Search Engine: Java
-
News Aggregator: PHP
-
Custom Submission Forms: Ruby
-
Real-Time Analytics: Python
Appendix Installing MongoDB
-
Choosing a Version
-
Windows Install
-
POSIX (Linux, Mac OS X, and Solaris) Install
Appendix mongo: The Shell
Appendix MongoDB Internals
-
BSON
-
Wire Protocol
-
Data Files
-
Namespaces and Extents
-
Memory-Mapped Storage Engine
Colophon