Book Image

Mastering MongoDB 4.x - Second Edition

By : Alex Giamas
Book Image

Mastering MongoDB 4.x - Second Edition

By: Alex Giamas

Overview of this book

MongoDB is the best platform for working with non-relational data and is considered to be the smartest tool for organizing data in line with business needs. The recently released MongoDB 4.x supports ACID transactions and makes the technology an asset for enterprises across the IT and fintech sectors. This book provides expertise in advanced and niche areas of managing databases (such as modeling and querying databases) along with various administration techniques in MongoDB, thereby helping you become a successful MongoDB expert. The book helps you understand how the newly added capabilities function with the help of some interesting examples and large datasets. You will dive deeper into niche areas such as high-performance configurations, optimizing SQL statements, configuring large-scale sharded clusters, and many more. You will also master best practices in overcoming database failover, and master recovery and backup procedures for database security. By the end of the book, you will have gained a practical understanding of administering database applications both on premises and on the cloud; you will also be able to scale database applications across all servers.
Table of Contents (20 chapters)
Free Chapter
1
Section 1: Basic MongoDB – Design Goals and Architecture
4
Section 2: Querying Effectively
10
Section 3: Administration and Data Management
15
Section 4: Scaling and High Availability

What this book covers

Chapter 1, MongoDB – A Database for Modern Web, takes us on a journey through web, SQL, and NoSQL technologies, from their inception to their current states.

Chapter 2, Schema Design and Data Modeling, teaches you schema design for relational databases and MongoDB, and how we can achieve the same goal from a different starting point.

Chapter 3, MongoDB CRUD Operations, provides a bird's-eye view of CRUD operations.

Chapter 4, Advanced Querying, covers advanced querying concepts using Ruby, Python, and PHP, using both the official drivers and an ODM.

Chapter 5, Multi-Document ACID Transactions, explores transactions following ACID characteristics, which is a new functionality introduced in MongoDB 4.0.

Chapter 6, Aggregation, dives deep into the aggregation framework. We also discuss when and why we should use aggregation, as opposed to MapReduce and querying the database.

Chapter 7, Indexing, explores one of the most important properties of every database, which is indexing.

Chapter 8, Monitoring, Backup, and Security, discusses the operational aspects of MongoDB. Monitoring, backup, and security should not be an afterthought, but rather are necessary processes that need to be taken care of before deploying MongoDB in a production environment.

Chapter 9, Storage Engines, teaches you about the different storage engines in MongoDB. We identify the pros and cons of each one, and the use cases for choosing each storage engine.

Chapter 10, MongoDB Tooling, covers all the different tools, both on-premises and in the cloud, that we can utilize in the MongoDB ecosystem.

Chapter 11, Harnessing Big Data with MongoDB, provides more detail on how MongoDB fits into the wider big data landscape and ecosystem.

Chapter 12, Replication, discusses replica sets and how to administer them. Starting from an architectural overview of replica sets and replica set internals around elections, we dive deep into setting up and configuring a replica set.

Chapter 13, Sharding, explores sharding, one of the most interesting features of MongoDB. We start with an architectural overview of sharding and move on to discuss how to design a shard, and especially, how to choose the right shard key.

Chapter 14, Fault Tolerance and High Availability, tries to fit in the information that we didn't manage to discuss in the previous chapters, and places emphasis on security and a series of checklists that developers and DBAs should keep into mind.