MongoDB: The Definitive Guide: Powerful and Scalable Data Storage, 3rd Edition
- Length: 425 pages
- Edition: 3
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2019-07-05
- ISBN-10: 1491954469
- ISBN-13: 9781491954461
- Sales Rank: #1158096 (See Top 100 Books)
Manage your data in a database system designed to support modern application development. The updated edition of this authoritative and accessible guide shows you the many advantages of using document-oriented databases, including how this secure, high-performance system enables flexible data models, high availability, and horizontal scalability.
Written by current and former members of the MongoDB team, the third edition is updated for MongoDB 3.6. You’ll find substantial updates on querying, indexing, aggregation, replica sets, ops manager, sharding administration, data administration, durability, monitoring, and security.
Authors Shannon Bradshaw (MongoDB) and Kristina Chodorow (Google) provide guidance for database developers, advanced configuration for system administrators, and use cases for a variety of projects. Ideal for NoSQL newcomers and experienced MongoDB users alike, this book also includes many real-world schema design examples.
Table of Contents
Part I. Introduction To Mongodb
Chapter 1. Introduction
Chapter 2. Getting Started
Chapter 3. Creating, Updating, And Deleting Documents
Chapter 4. Querying
Part II. Designing Your Application
Chapter 5. Indexes
Chapter 6. Special Index And Collection Types
Chapter 7. Introduction To The Aggregation Framework
Part III. Replication
Chapter 8. Setting Up A Replica Set
Chapter 9. Components Of A Replica Set
Chapter 10. Connecting To A Replica Set From Your Application
Chapter 11. Administration
Chapter 12. Introduction To Sharding
Chapter 13. Configuring Sharding
Chapter 14. Choosing A Shard Key
Chapter 15. Sharding Administration
Chapter 16. An Introduction To Mongodb Security
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 O’Reilly Online Learning How to Contact Us I. Introduction to MongoDB 1. Introduction Ease of Use Designed to Scale Rich with Features… …Without Sacrificing Speed The Philosophy 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 3. Creating, Updating, and Deleting Documents Inserting Documents insertMany Insert Validation insert Removing Documents drop Updating Documents Document Replacement Using Update Operators Upserts Updating Multiple Documents Returning Updated Documents 4. Querying Introduction to find Specifying Which Keys to Return Limitations Query Criteria Query Conditionals OR Queries $not Type-Specific Queries null Regular Expressions Querying Arrays Querying on Embedded Documents $where Queries Cursors Limits, Skips, and Sorts Avoiding Large Skips Immortal Cursors II. Designing Your Application 5. Indexes Introduction to Indexes Creating an Index Introduction to Compound Indexes How MongoDB Selects an Index Using Compound Indexes How $ Operators Use Indexes Indexing Objects and Arrays Index Cardinality explain Output When Not to Index Types of Indexes Unique Indexes Partial Indexes Index Administration Identifying Indexes Changing Indexes 6. Special Index and Collection Types Geospatial Indexes Types of Geospatial Queries Using Geospatial Indexes Compound Geospatial Indexes 2d Indexes Indexes for Full Text Search Creating a Text Index Text Search Optimizing Full-Text Search Searching in Other Languages Capped Collections Creating Capped Collections Tailable Cursors Time-To-Live Indexes Storing Files with GridFS Getting Started with GridFS: mongofiles Working with GridFS from the MongoDB Drivers Under the Hood 7. Introduction to the Aggregation Framework Pipelines, Stages, and Tunables Getting Started with Stages: Familiar Operations Expressions $project $unwind Array Expressions Accumulators Using Accumulators in Project Stages Introduction to Grouping The _id Field in Group Stages Group Versus Project Writing Aggregation Pipeline Results to a Collection 8. Transactions Introduction to Transactions A Definition of ACID How to Use Transactions Tuning Transaction Limits for Your Application Timing and Oplog Size Limits 9. Application Design Schema Design Considerations Schema Design Patterns Normalization Versus Denormalization Examples of Data Representations Cardinality Friends, Followers, and Other Inconveniences Optimizations for Data Manipulation Removing Old Data Planning Out Databases and Collections Managing Consistency Migrating Schemas Managing Schemas When Not to Use MongoDB III. Replication 10. Setting Up a Replica Set Introduction to Replication Setting Up a Replica Set, Part 1 Networking Considerations Security Considerations Setting Up a Replica Set, Part 2 Observing Replication Changing Your Replica Set Configuration How to Design a Set How Elections Work Member Configuration Options Priority Hidden Members Election Arbiters Building Indexes 11. Components of a Replica Set Syncing Initial Sync Replication Handling Staleness Heartbeats Member States Elections Rollbacks When Rollbacks Fail 12. Connecting to a Replica Set from Your Application Client−to−Replica Set Connection Behavior Waiting for Replication on Writes 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 13. 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 Monitoring Replication Getting the Status Visualizing the Replication Graph Replication Loops Disabling Chaining Calculating Lag Resizing the Oplog Building Indexes Replication on a Budget IV. Sharding 14. Introduction to Sharding What Is Sharding? Understanding the Components of a Cluster Sharding on a Single-Machine Cluster 15. 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 Collations Change Streams 16. 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 17. 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 Server Administration Adding Servers Changing Servers in a Shard Removing a Shard Balancing Data The Balancer Changing Chunk Size Moving Chunks Jumbo Chunks Refreshing Configurations V. Application Administration 18. 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 Documents Collections Databases Using mongotop and mongostat 19. An Introduction to MongoDB Security MongoDB Authentication and Authorization Authentication Mechanisms Authorization Using x.509 Certificates to Authenticate Both Members and Clients A Tutorial on MongoDB Authentication and Transport Layer Encryption Establish a CA Generate and Sign Member Certificates Generate and Sign Client Certificates Bring Up the Replica Set Without Authentication and Authorization Enabled Create the Admin User Restart the Replica Set with Authentication and Authorization Enabled 20. Durability Durability at the Member Level Through Journaling Durability at the Cluster Level Using Write Concern The w and wtimeout Options for writeConcern The j (Journaling) Option for writeConcern Durability at a Cluster Level Using Read Concern Durability of Transactions Using a Write Concern What MongoDB Does Not Guarantee Checking for Corruption VI. Server Administration 21. Setting Up MongoDB in Production Starting from the Command Line File-Based Configuration Stopping MongoDB Security Data Encryption SSL Connections Logging 22. Monitoring MongoDB Monitoring Memory Usage Introduction to Computer Memory Tracking Memory Usage Tracking Page Faults I/O Wait Calculating the Working Set Some Working Set Examples Tracking Performance Tracking Free Space Monitoring Replication 23. Making Backups Backup Methods Backing Up a Server Filesystem Snapshot Copying Data Files Using mongodump Specific Considerations for Replica Sets Specific Considerations for Sharded Clusters Backing Up and Restoring an Entire Cluster Backing Up and Restoring a Single Shard 24. Deploying MongoDB Designing the System Choosing a Storage Medium Recommended RAID Configurations CPU Operating System Swap Space Filesystem Virtualization Memory Overcommitting Mystery Memory Handling Network Disk I/O Issues Using Non-Networked Disks Configuring System Settings Turning Off NUMA Setting Readahead Disabling Transparent Huge Pages (THP) Choosing a Disk Scheduling Algorithm Disabling Access Time Tracking Modifying Limits Configuring Your Network System Housekeeping Synchronizing Clocks The OOM Killer Turn Off Periodic Tasks A. Installing MongoDB Choosing a Version Windows Install Installing as a Service POSIX (Linux and Mac OS X) Install Installing from a Package Manager B. MongoDB Internals BSON Wire Protocol Data Files Namespaces WiredTiger Storage Engine Index
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: MongoDB: The Definitive Guide: Powerful and Scalable Data Storage, 3rd Edition
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.