- Format: PDF
- Publisher: O’Reilly Media; 3rd edition (December 31, 2019)
- Language: English
- 514 pages
- ISBN-10: 1491954469
- ISBN-13: 978-1491954461
Manage your data with a system designed to support modern application development. Updated for MongoDB 4.2, the third edition of this authoritative and accessible guide shows you the advantages of using document-oriented databases. You’ll learn how this secure, high-performance system enables flexible data models, high availability, and horizontal scalability.
Authors Shannon Bradshaw, Eoin Brazil, and Kristina Chodorow provide guidance for database developers, advanced configuration for system administrators, and use cases for a variety of projects. NoSQL newcomers and experienced MongoDB users will find updates on querying, indexing, aggregation, transactions, replica sets, ops management, sharding and data administration, durability, monitoring, and security.
In six parts, this book shows you how to:
- Work with MongoDB, perform write operations, find documents, and create complex queries
- Index collections, aggregate data, and use transactions for your application
- Configure a local replica set and learn how replication interacts with your application
- Set up cluster components and choose a shard key for a variety of applications
- Explore aspects of application administration and configure authentication and authorization
- Use stats when monitoring, back up and restore deployments, and use system settings when deploying MongoDB
How This Book Is Organized
This book is split up into six sections, covering development, administration, and deployment information.
Getting Started with MongoDB
In Chapter 1 we provide background on MongoDB: why it was created, the goals it is trying to accomplish, and why you might choose to use it for a project. We go into more detail in Chapter 2, which provides an introduction to the core concepts and vocabulary of MongoDB. Chapter 2 also provides a first look at working with MongoDB, getting you started with the database and the shell. The next two chapters cover the basic material that developers need to know to work with MongoDB. In Chapter 3, we describe how to perform those basic write operations, including how to do them with different levels of safety and speed. Chapter 4 explains how to find documents and create complex queries. This chapter also covers how to iterate through results and gives options for limiting, skipping, and sorting results.
Developing with MongoDB
Chapter 5 covers what indexing is and how to index your MongoDB collections. Chapter 6 explains how to use several special types of indexes and collections. Chapter 7 covers a number of techniques for aggregating data with MongoDB, including counting, finding distinct values, grouping documents, the aggregation framework, and writing these results to a collection. Chapter 8 introduces transactions: what they are, how best to use them for your application, and how to tune. Finally, this section finishes with a chapter on designing your application: Chapter 9 goes over tips for writing an application that works well with MongoDB.
The replication section starts with Chapter 10, which gives you a quick way to set up a replica set locally and covers many of the available configuration options. Chapter 11 then covers the various concepts related to replication. Chapter 12 shows how replication interacts with your application and Chapter 13 covers the administrative aspects of running a replica set.
The sharding section starts in Chapter 14 with a quick local setup. Chapter 15 then gives an overview of the components of the cluster and how to set them up. Chapter 16 has advice on choosing a shard key for a variety of applications. Finally, Chapter 17 covers administering a sharded cluster.
The next two chapters cover many aspects of MongoDB administration from the perspective of your application. Chapter 18 discusses how to introspect what MongoDB is doing. Chapter 19 covers security in MongoDb and how to configure authentication as well as authorization for your deployment. Chapter 20 explains how MongoDB stores data durably.
The final section is focused on server administration. Chapter 21 covers common options when starting and stopping MongoDB. Chapter 22 discusses what to look for and how to read stats when monitoring. Chapter 23 describes how to take and restore backups for each type of deployment. Finally, Chapter 24 discusses a number of system settings to keep in mind when deploying MongoDB.
Shannon Bradshaw is VP of Education at MongoDB. In this capacity, he manages online and in-person training products delivered through MongoDB University and the MongoDB Professional Certification program. Shannon holds a Ph.D. in Computer Science from Northwestern University. Prior to MongoDB, Shannon was an Assistant Professor in the Business School at The University of Iowa and then Chair and Associate Professor of Computer Science at Drew University. Throughout his career in academia, Shannon consulted as a software engineer with several startups and financial services firms.
Eoin Brazil is a senior curriculum engineer at MongoDB. He works on online and instructor led training products delivered through MongoDB University and previously held various positions in the Technical Services support organization within MongoDB. Eoin holds a Ph.D. and a M.Sc in Computer Science from the University of Limerick and PG Dip, in Technology Commericalization from the National University of Ireland, Galway. Prior to MongoDB, he lead teams in mobile services and in high performance computing in the academic research sector.
Kristina Chodorow is a software engineer who worked on the MongoDB core for five years. She led MongoDB’s replica set development as well as writing the PHP and Perl drivers. She has given talks on MongoDB at meetups and conferences around the world and maintains a blog on technical topics at http://www.kchodorow.com. She currently works at Google.