My Account Log in

1 option

MongoDB : the definitive guide / Kristina Chodorow.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Chodorow, Kristina.
Language:
English
Subjects (All):
MongoDB.
Object-oriented databases.
Open source software.
Physical Description:
1 online resource (432 p.)
Edition:
2nd ed.
Place of Publication:
Beijing : O'Reilly, 2013.
Language Note:
English
System Details:
text file
Summary:
Manage the huMONGOus amount of data collected through your web application with MongoDB. This authoritative introduction-written by a core contributor to the project-shows you the many advantages of using document-oriented databases, and demonstrates how this reliable, high-performance system allows for almost infinite horizontal scalability. This updated second edition 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. Ideal for NoSQL newcomers and experienced MongoDB us
Contents:
Cover
Copyright
Table of Contents
Foreword
Preface
How This Book Is Organized
Getting Started with MongoDB
Developing with MongoDB
Replication
Sharding
Application Administration
Server Administration
Appendixes
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
Part I. Introduction to MongoDB
Chapter 1. Introduction
Ease of Use
Easy Scaling
Tons of Features...
...Without Sacrificing Speed
Let's Get Started
Chapter 2. Getting Started
Documents
Collections
Dynamic Schemas
Naming
Databases
Getting and Starting MongoDB
Introduction to the MongoDB Shell
Running the Shell
A MongoDB Client
Basic Operations with the Shell
Data Types
Basic Data Types
Dates
Arrays
Embedded Documents
_id and ObjectIds
Using the MongoDB Shell
Tips for Using the Shell
Running Scripts with the Shell
Creating a .mongorc.js
Customizing Your Prompt
Editing Complex Variables
Inconvenient Collection Names
Chapter 3. Creating, Updating, and Deleting Documents
Inserting and Saving Documents
Bulk Insert
Insert Validation
Removing Documents
Remove Speed
Updating Documents
Document Replacement
Using Modifiers
Upserts
Updating Multiple Documents
Returning Updated Documents
Setting a Write Concern
Chapter 4. Querying
Introduction to find
Specifying Which Keys to Return
Limitations
Query Criteria
Query Conditionals
OR Queries
not
Conditional Semantics
Type-Specific Queries
null
Regular Expressions
Querying Arrays
Querying on Embedded Documents
where Queries
Server-Side Scripting
Cursors
Limits, Skips, and Sorts
Avoiding Large Skips
Advanced Query Options
Getting Consistent Results.
Immortal Cursors
Database Commands
How Commands Work
Part II. Designing Your Application
Chapter 5. Indexing
Introduction to Indexing
Introduction to Compound Indexes
Using Compound Indexes
How -Operators Use Indexes
Indexing Objects and Arrays
Index Cardinality
Using explain() and hint()
The Query Optimizer
When Not to Index
Types of Indexes
Unique Indexes
Sparse Indexes
Index Administration
Identifying Indexes
Changing Indexes
Chapter 6. Special Index and Collection Types
Capped Collections
Creating Capped Collections
Sorting Au Naturel
Tailable Cursors
No-_id Collections
Time-To-Live Indexes
Full-Text Indexes
Search Syntax
Full-Text Search Optimization
Searching in Other Languages
Geospatial Indexing
Types of Geospatial Queries
Compound Geospatial Indexes
2D Indexes
Storing Files with GridFS
Getting Started with GridFS: mongofiles
Working with GridFS from the MongoDB Drivers
Under the Hood
Chapter 7. Aggregation
The Aggregation Framework
Pipeline Operations
match
project
group
unwind
sort
limit
skip
Using Pipelines
MapReduce
Example 1: Finding All Keys in a Collection
Example 2: Categorizing Web Pages
MongoDB and MapReduce
Aggregation Commands
count
distinct
Chapter 8. Application Design
Normalization versus Denormalization
Examples of Data Representations
Cardinality
Friends, Followers, and Other Inconveniences
Optimizations for Data Manipulation
Optimizing for Document Growth
Removing Old Data
Planning Out Databases and Collections
Managing Consistency
Migrating Schemas
When Not to Use MongoDB
Part III. Replication
Chapter 9. Setting Up a Replica Set
Introduction to Replication
A One-Minute Test Setup.
Configuring a Replica Set
rs Helper Functions
Networking Considerations
Changing Your Replica Set Configuration
How to Design a Set
How Elections Work
Member Configuration Options
Creating Election Arbiters
Priority
Hidden
Slave Delay
Building Indexes
Chapter 10. Components of a Replica Set
Syncing
Initial Sync
Handling Staleness
Heartbeats
Member States
Elections
Rollbacks
When Rollbacks Fail
Chapter 11. Connecting to a Replica Set from Your Application
Client-to-Replica-Set Connection Behavior
Waiting for Replication on Writes
What Can Go Wrong?
Other Options for "w"
Custom Replication Guarantees
Guaranteeing One Server per Data Center
Guaranteeing a Majority of Nonhidden Members
Creating Other Guarantees
Sending Reads to Secondaries
Consistency Considerations
Load Considerations
Reasons to Read from Secondaries
Chapter 12. Administration
Starting Members in Standalone Mode
Replica Set Configuration
Creating a Replica Set
Changing Set Members
Creating Larger Sets
Forcing Reconfiguration
Manipulating Member State
Turning Primaries into Secondaries
Preventing Elections
Using Maintenance Mode
Monitoring Replication
Getting the Status
Visualizing the Replication Graph
Replication Loops
Disabling Chaining
Calculating Lag
Resizing the Oplog
Restoring from a Delayed Secondary
Replication on a Budget
How the Primary Tracks Lag
Master-Slave
Converting Master-Slave to a Replica Set
Mimicking Master-Slave Behavior with Replica Sets
Part IV. Sharding
Chapter 13. Introduction to Sharding
Introduction to Sharding
Understanding the Components of a Cluster
A One-Minute Test Setup
Chapter 14. Configuring Sharding
When to Shard
Starting the Servers.
Config Servers
The mongos Processes
Adding a Shard from a Replica Set
Adding Capacity
Sharding Data
How MongoDB Tracks Cluster Data
Chunk Ranges
Splitting Chunks
The Balancer
Chapter 15. Choosing a Shard Key
Taking Stock of Your Usage
Picturing Distributions
Ascending Shard Keys
Randomly Distributed Shard Keys
Location-Based Shard Keys
Shard Key Strategies
Hashed Shard Key
Hashed Shard Keys for GridFS
The Firehose Strategy
Multi-Hotspot
Shard Key Rules and Guidelines
Shard Key Limitations
Shard Key Cardinality
Controlling Data Distribution
Using a Cluster for Multiple Databases and Collections
Manual Sharding
Chapter 16. Sharding Administration
Seeing the Current State
Getting a Summary with sh.status
Seeing Configuration Information
Tracking Network Connections
Getting Connection Statistics
Limiting the Number of Connections
Adding Servers
Changing Servers in a Shard
Removing a Shard
Changing Config Servers
Balancing Data
Changing Chunk Size
Moving Chunks
Jumbo Chunks
Refreshing Configurations
Part V. Application Administration
Chapter 17. Seeing What Your Application Is Doing
Seeing the Current Operations
Finding Problematic Operations
Killing Operations
False Positives
Preventing Phantom Operations
Using the System Profiler
Calculating Sizes
Using mongotop and mongostat
Chapter 18. Data Administration
Setting Up Authentication
Authentication Basics
How Authentication Works
Creating and Deleting Indexes
Creating an Index on a Standalone Server
Creating an Index on a Replica Set
Creating an Index on a Sharded Cluster
Removing Indexes
Beware of the OOM Killer.
Preheating Data
Moving Databases into RAM
Moving Collections into RAM
Custom-Preheating
Compacting Data
Moving Collections
Preallocating Data Files
Chapter 19. Durability
What Journaling Does
Planning Commit Batches
Setting Commit Intervals
Turning Off Journaling
Replacing Data Files
Repairing Data Files
The mongod.lock File
Sneaky Unclean Shutdowns
What MongoDB Does Not Guarantee
Checking for Corruption
Durability with Replication
Part VI. Server Administration
Chapter 20. Starting and Stopping MongoDB
Starting from the Command Line
File-Based Configuration
Stopping MongoDB
Security
Data Encryption
SSL Connections
Logging
Chapter 21. Monitoring MongoDB
Monitoring Memory Usage
Introduction to Computer Memory
Tracking Memory Usage
Tracking Page Faults
Minimizing Btree Misses
IO Wait
Tracking Background Flush Averages
Calculating the Working Set
Some Working Set Examples
Tracking Performance
Tracking Free Space
Chapter 22. Making Backups
Backing Up a Server
Filesystem Snapshot
Copying Data Files
Using mongodump
Backing Up a Replica Set
Backing Up a Sharded Cluster
Backing Up and Restoring an Entire Cluster
Backing Up and Restoring a Single Shard
Creating Incremental Backups with mongooplog
Chapter 23. Deploying MongoDB
Designing the System
Choosing a Storage Medium
Recommended RAID Configurations
CPU
Choosing an Operating System
Swap Space
Filesystem
Virtualization
Turn Off Memory Overcommitting
Mystery Memory
Handling Network Disk IO Issues
Using Non-Networked Disks
Configuring System Settings
Turning Off NUMA
Setting a Sane Readahead
Disabling Hugepages
Choosing a Disk Scheduling Algorithm
Don't Track Access Time.
Modifying Limits.
Notes:
Includes index.
Previous edition: 2010.
Description based on print version record.
ISBN:
9781449344818
144934481X
9781306811484
1306811481
9781449344795
1449344798
9781449344825
1449344828
OCLC:
1024256167

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account