Book description
MongoDB, a cross-platform NoSQL database, is the fastest-growing new database in the world. MongoDB provides a rich document orientated structure with dynamic queries that you'll recognize from RDMBS offerings such as MySQL. In other words, this is a book about a NoSQL database that does not require the SQL crowd to re-learn how the database world works!
MongoDB has reached 1.0 and already boasts 50,000+ users. The community is strong and vibrant and MongoDB is improving at a fast rate. With scalable and fast databases becoming critical for today's applications, this book shows you how to install, administer and program MongoDB *without* pretending SQL never existed.
Table of contents
- Copyright
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
I. Basics
-
1. Introduction to MongoDB
- 1.1. Reviewing the MongoDB Philosophy
- 1.2. Fitting Everything Together
-
1.3. Reviewing the Feature List
- 1.3.1. Using Document-Orientated Storage (BSON)
- 1.3.2. Supporting Dynamic Queries
- 1.3.3. Indexing Your Documents
- 1.3.4. Leveraging Geospatial Indexes
- 1.3.5. Profiling Queries
- 1.3.6. Updating Information In-Place
- 1.3.7. Storing Binary Data
- 1.3.8. Replicating Data
- 1.3.9. Implementing Auto Sharding
- 1.3.10. Using Map and Reduce Functions
- 1.4. Getting Help
- 1.5. Summary
- 2. Installing MongoDB
- 3. The Data Model
-
4. Working with Data
- 4.1. Navigating Your Databases
- 4.2. Inserting Data into Collections
-
4.3. Querying for Data
- 4.3.1. Using the Dot Notation
- 4.3.2. Using the Sort, Limit, and Skip Functions
- 4.3.3. Working with Capped Collections, Natural Order, and $natural
- 4.3.4. Retrieving a Single Document
- 4.3.5. Using the Aggregation Commands
-
4.3.6. Working with Conditional Operators
- 4.3.6.1. Performing Greater and Less Than Comparisons
- 4.3.6.2. Retrieving All Documents but Those Specified
- 4.3.6.3. Specifying an Array of Matches
- 4.3.6.4. Finding a Value Not in an Array
- 4.3.6.5. Matching all Attributes in a Document
- 4.3.6.6. Searching for Multiple Expressions in a Document
- 4.3.6.7. Retrieving a Document with $slice
- 4.3.6.8. Searching for Odd/Even Integers
- 4.3.6.9. Filtering Results with $size
- 4.3.6.10. Returning a Specific Field Object
- 4.3.6.11. Matching Results Based on the BSON Type
- 4.3.6.12. Matching an Entire Array
- 4.3.6.13. $not (meta-operator)
- 4.3.6.14. Specifying Additional Query Expressions
- 4.3.7. Leveraging Regular Expressions
-
4.4. Updating Data
- 4.4.1. Updating with update()
- 4.4.2. Implementing an Upsert with the save() Command
-
4.4.3. Updating Information Automatically
- 4.4.3.1. Incrementing a Value with $inc
- 4.4.3.2. Setting a Field's Value
- 4.4.3.3. Deleting a Given Field
- 4.4.3.4. Appending a Value to a Specified Field
- 4.4.3.5. Specifying Multiple Values in an Array
- 4.4.3.6. Adding Data to an Array with $addToSet
- 4.4.3.7. Removing Elements from an Array
- 4.4.3.8. Removing Each Occurrence of a Specified Value
- 4.4.3.9. Removing Multiple Elements from an Array
- 4.4.4. Specifying the Position of a Matched Array
- 4.4.5. Atomic Operations
- 4.4.6. Modifying and Returning a Document Atomically
- 4.5. Renaming a Collection
- 4.6. Removing Data
- 4.7. Referencing a Database
- 4.8. Implementing Index-Related Functions
- 4.9. Summary
- 5. GridFS
-
1. Introduction to MongoDB
-
II. Developing
-
6. PHP and MongoDB
- 6.1. Comparing Documents in MongoDB and PHP
- 6.2. MongoDB Classes
- 6.3. Connecting and Disconnecting
- 6.4. Inserting Data
-
6.5. Listing Your Data
- 6.5.1. Returning a Single Document
- 6.5.2. Listing All Documents
- 6.5.3. Using Query Operators
- 6.5.4. Querying for Specific Information
- 6.5.5. Sorting, Limiting, and Skipping Items
- 6.5.6. Counting the Number of Matching Results
- 6.5.7. Grouping Data with Map/Reduce
- 6.5.8. Specifying the Index with Hint
-
6.5.9. Refining Queries with Conditional Operators
- 6.5.9.1. Using the $lt, $gt, $lte, and $gte Operators
- 6.5.9.2. Finding Documents that Don't Match a Value
- 6.5.9.3. Matching Any of Multiple Values with $in
- 6.5.9.4. Matching All Criteria in a Query with $all
- 6.5.9.5. Searching for Multiple Expressions with $or
- 6.5.9.6. Retrieving a Specified Number of Items with $slice
- 6.5.9.7. Determining Whether a Field Has a Value
- 6.5.10. Regular Expressions
-
6.6. Modifying Data with PHP
- 6.6.1. Updating via update()
-
6.6.2. Saving Time with Modifier Operators
- 6.6.2.1. Increasing the Value of a Specific Key with $inc
- 6.6.2.2. Changing the Value of a Key with $set
- 6.6.2.3. Deleting a Field with $unset
- 6.6.2.4. Appending a Value to a Specified Field with $push
- 6.6.2.5. Adding Multiple Values to a Key with $pushAll
- 6.6.2.6. Adding Data to an Array with $addToSet
- 6.6.2.7. Removing an Element from an Array with $pop
- 6.6.2.8. Removing Each Occurrence of a Value with $pull
- 6.6.2.9. Removing Each Occurrence of Multiple Elements
- 6.6.3. Upserting Data with save()
- 6.6.4. Modifying a Document Atomically
- 6.7. Deleting Data
- 6.8. DBRef
- 6.9. GridFS and the PHP Driver
- 6.10. Summary
-
7. Python and MongoDB
- 7.1. Working with Documents in Python
- 7.2. Using PyMongo Modules
- 7.3. Connecting and Disconnecting
- 7.4. Inserting Data
-
7.5. Finding Your Data
- 7.5.1. Finding a Single Document
- 7.5.2. Finding Multiple Documents
- 7.5.3. Using Dot Notation
- 7.5.4. Returning Fields
- 7.5.5. Simplifying Queries with Sort, Limit, and Skip
- 7.5.6. Aggregating Queries
- 7.5.7. Specifying an Index with Hint()
-
7.5.8. Refining Queries with Conditional Operators
- 7.5.8.1. Using the $lt, $gt, $lte, and $gte Operators
- 7.5.8.2. Searching for Non-Matching Values with $ne
- 7.5.8.3. Specifying an Array of Matches with $in
- 7.5.8.4. Specifying Against an Array of Matches with $nin
- 7.5.8.5. Finding Documents that Match an Array's Values
- 7.5.8.6. Specifying Multiple Expressions to Match with $or
- 7.5.8.7. Retrieving Items from an Array with $slice
- 7.5.9. Conducting Searches with Regular Expression
-
7.6. Modifying the Data
- 7.6.1. Updating Your Data
-
7.6.2. Modifier Operators
- 7.6.2.1. Increasing an Integer Value with $inc
- 7.6.2.2. Changing an Existing Value with $set
- 7.6.2.3. Removing a Key/Value Field with $unset
- 7.6.2.4. Adding a Value to an Array with $push
- 7.6.2.5. Adding Multiple Values to an Array with $pushAll
- 7.6.2.6. Adding a Value to an Existing Array with $addToSet
- 7.6.2.7. Removing an Element from an Array with $pop
- 7.6.2.8. Removing a Specific Value with $pull
- 7.6.3. Saving Documents Quickly with Save()
- 7.6.4. Modifying a Document Atomically
- 7.6.5. Putting the Parameters to Work
- 7.7. Deleting Data
- 7.8. Creating a Link Between Two Documents
- 7.9. Summary
- 8. Creating a Blog Application with the PHP Driver
-
6. PHP and MongoDB
-
III. Advanced
-
9. Database Administration
- 9.1. Using Administrative Tools
- 9.2. Backing up the MongoDB Server
- 9.3. Digging Deeper into Backups
- 9.4. Restoring Individual Databases or Collections
- 9.5. Automating Backups
- 9.6. Backing up Large Databases
- 9.7. Importing Data into MongoDB
- 9.8. Exporting Data from MongoDB
- 9.9. Securing Your Data
- 9.10. Protecting Your Server with Authentication
- 9.11. Managing Servers
- 9.12. Using MongoDB Logfiles
- 9.13. Validating and Repairing Your Data
- 9.14. Upgrading MongoDB
- 9.15. Monitoring MongoDB
- 9.16. Using the mongod Web Interface
- 9.17. Summary
-
10. Optimization
- 10.1. Optimizing Your Server Hardware for Performance
- 10.2. Evaluating Query Performance
- 10.3. MongoDB Profiler
- 10.4. Managing Indexes
- 10.5. Specifying Index Options
- 10.6. How MongoDB Selects Which Indexes It Will Use
- 10.7. Using Hint() to Force Using a Specific Index
- 10.8. Optimizing the Storage of Small Objects
- 10.9. Summary
-
11. Replication
- 11.1. Spelling Out MongoDB's Replication Goals
- 11.2. Drilling Down on the Oplog
- 11.3. Implementing Single Master/Single Slave Replication
- 11.4. Implementing Single Master/Multiple Slave Replication
- 11.5. Configuring a Master/Slave Replication System
- 11.6. Resynchronizing a Master/Slave Replication System
- 11.7. Implementing Multiple Master/Single Slave Replication
- 11.8. Exploring Various Replication Scenarios
- 11.9. Using Replica Pairs
-
11.10. Implementing Advanced Clustering with Replica Sets
- 11.10.1. Creating a Replica Set
- 11.10.2. Getting a Replica Set Member Up and Running
- 11.10.3. Adding a Server to a Replica Set
- 11.10.4. Managing Replica Sets
- 11.10.5. Configuring the Options for Replica Set Members
- 11.10.6. Determining the Status of Replica Sets
- 11.10.7. Connecting to a Replica Set from Your Application
- 11.11. Summary
-
12. Sharding
- 12.1. Exploring the Need for Sharding
- 12.2. Partitioning Horizontal and Vertical Data
- 12.3. Analyzing a Simple Sharding Scenario
- 12.4. Implementing Sharding with MongoDB
- 12.5. Setting Up a Sharding Configuration
- 12.6. Removing a Shard from the Cluster
- 12.7. Determining How You're Connected
- 12.8. Listing the Status of a Sharded Cluster
- 12.9. Using Replica Sets to Implement Shards
- 12.10. Sharding to Improve Performance
- 12.11. Summary
-
9. Database Administration
Product information
- Title: The Definitive Guide to MongoDB: The NoSQL Database for Cloud and Desktop Computing
- Author(s):
- Release date: September 2010
- Publisher(s): Apress
- ISBN: 9781430230519
You might also like
book
Mastering MongoDB 3.x
An expert's guide to build fault tolerant MongoDB application About This Book Master the advanced modeling, …
book
Practical MongoDB: Architecting, Developing, and Administering MongoDB
Practical Guide to MongoDB: Architecting, Developing, and Administering MongoDB begins with a short introduction to the …
book
The Definitive Guide to MongoDB: A complete guide to dealing with Big Data using MongoDB, Second Edition
The Definitive Guide to MongoDB, Second Edition, is updated for the latest version and includes all …
book
Learn MongoDB 4.x
Design, administer, and deploy high-volume and fault-tolerant database applications using MongoDB 4.x Key Features Build a …