The Definitive Guide To MongoDB Moongo DB
User Manual:
Open the PDF directly: View PDF
Page Count: 319 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- The Definitive Guide
to MongoDB
- Contents at a Glance
- Contents
- About the Authors
- About the Technical Reviewers
- Acknowledgments
- Introduction
- Part 1: MongoDB Basics
- Chapter 1: Introduction to MongoDB
- Chapter 2: Installing MongoDB
- Chapter 3: The Data Model
- Chapter 4: Working with Data
- Navigating Your Databases
- Inserting Data into Collections
- Querying for Data
- Using the Dot Notation
- Using the Sort, Limit, and Skip Functions
- Working with Capped Collections, Natural Order, and $natural
- Retrieving a Single Document
- Using the Aggregation Commands
- Working with Conditional Operators
- Performing Greater-Than and Less-Than Comparisons
- Retrieving All Documents but Those Specified
- Specifying an Array of Matches
- Finding a Value Not in an Array
- Matching All Attributes in a Document
- Searching for Multiple Expressions in a Document
- Retrieving a Document with $slice
- Searching for Odd/Even Integers
- Filtering Results with $size
- Returning a Specific Field Object
- Matching Results Based on the BSON Type
- Matching an Entire Array
- $not (meta-operator)
- Specifying Additional Query Expressions
- Leveraging Regular Expressions
- Updating Data
- Updating with update()
- Implementing an Upsert with the save() Command
- Updating Information Automatically
- Incrementing a Value with $inc
- Setting a Field’s Value
- Deleting a Specified Field
- Appending a Value to a Specified Field
- Specifying Multiple Values in an Array
- Adding Data to an Array with $addToSet
- Removing Elements from an Array
- Removing Each Occurrence of a Specified Value
- Removing Multiple Elements from an Array
- Specifying the Position of a Matched Array
- Atomic Operations
- Modifying and Returning a Document Atomically
- Renaming a Collection
- Removing Data
- Referencing a Database
- Implementing Index-Related Functions
- Summary
- Chapter 5: GridFS
- Part 2: Developing with MongoDB
- Chapter 6: PHP and MongoDB
- Comparing Documents in MongoDB and PHP
- MongoDB Classes
- Connecting and Disconnecting
- Inserting Data
- Listing Your Data
- Returning a Single Document
- Listing All Documents
- Using Query Operators
- Querying for Specific Information
- Sorting, Limiting, and Skipping Items
- Counting the Number of Matching Results
- Grouping Data with the Aggregation Framework
- Specifying the Index with Hint
- Refining Queries with Conditional Operators
- Using the $lt, $gt, $lte, and $gte Operators
- Finding Documents that Don’t Match a Value
- Matching Any of Multiple Values with $in
- Matching All Criteria in a Query with $all
- Searching for Multiple Expressions with $or
- Retrieving a Specified Number of Items with $slice
- Determining Whether a Field Has a Value
- Regular Expressions
- Modifying Data with PHP
- Updating via update()
- Saving Time with Update Operators
- Increasing the Value of a Specific Key with $inc
- Changing the Value of a Key with $set
- Deleting a Field with $unset
- Renaming a Field with $rename
- Changing the Value of a Key during Upsert with $setOnInsert
- Appending a Value to a Specified Field with $push
- Adding Multiple Values to a Key with $push and $each
- Adding Data to an Array with $addToSet
- Removing an Element from an Array with $pop
- Removing Each Occurrence of a Value with $pull
- Removing Each Occurrence of Multiple Elements
- Upserting Data with save()
- Modifying a Document Atomically
- Deleting Data
- DBRef
- GridFS and the PHP Driver
- Summary
- Chapter 7: Python and MongoDB
- Working with Documents in Python
- Using PyMongo Modules
- Connecting and Disconnecting
- Inserting Data
- Finding Your Data
- Finding a Single Document
- Finding Multiple Documents
- Using Dot Notation
- Returning Fields
- Simplifying Queries with sort(), limit(), and skip()
- Aggregating Queries
- Specifying an Index with hint()
- Refining Queries with Conditional Operators
- Using the $lt, $gt, $lte, and $gte Operators
- Searching for Non-Matching Values with $ne
- Specifying an Array of Matches with $in
- Specifying Against an Array of Matches with $nin
- Finding Documents that Match an Array’s Values
- Specifying Multiple Expressions to Match with $or
- Retrieving Items from an Array with $slice
- Conducting Searches with Regular Expressions
- Modifying the Data
- Updating Your Data
- Modifier Operators
- Increasing an Integer Value with $inc
- Changing an Existing Value with $set
- Removing a Key/Value Field with $unset
- Adding a Value to an Array with $push
- Adding Multiple Values to an Array with $push and $each
- Adding a Value to an Existing Array with $addToSet
- Removing an Element from an Array with $pop
- Removing a Specific Value with $pull
- Saving Documents Quickly with save()
- Modifying a Document Atomically
- Putting the Parameters to Work
- Deleting Data
- Creating a Link Between Two Documents
- Summary
- Chapter 8: Advanced Queries
- Chapter 6: PHP and MongoDB
- Part 3: Advanced MongoDB with Big Data
- Chapter 9: Database Administration
- Using Administrative Tools
- Backing Up the MongoDB Server
- Digging Deeper into Backups
- Restoring Individual Databases or Collections
- Automating Backups
- Backing Up Large Databases
- Importing Data into MongoDB
- Exporting Data from MongoDB
- Securing Your Data by Restricting Access to a MongoDB Server
- Protecting Your Server with Authentication
- Managing Servers
- Using MongoDB Logfiles
- Validating and Repairing Your Data
- Upgrading MongoDB
- Rolling Upgrade of MongoDB
- Monitoring MongoDB
- Using the MongoDB Management Service (MMS)
- Summary
- Chapter 10: Optimization
- Chapter 11: Replication
- Spelling Out MongoDB’s Replication Goals
- Replication Fundamentals
- Drilling Down on the Oplog
- Implementing a Replica Set
- Summary
- Chapter 12: Sharding
- Chapter 9: Database Administration
- Index