Book Image

Learn MongoDB 4.x

By : Doug Bierer
Book Image

Learn MongoDB 4.x

By: Doug Bierer

Overview of this book

When it comes to managing a high volume of unstructured and non-relational datasets, MongoDB is the defacto database management system (DBMS) for DBAs and data architects. This updated book includes the latest release and covers every feature in MongoDB 4.x, while helping you get hands-on with building a MongoDB database app. You’ll get to grips with MongoDB 4.x concepts such as indexes, database design, data modeling, authentication, and aggregation. As you progress, you’ll cover tasks such as performing routine operations when developing a dynamic database-driven website. Using examples, you’ll learn how to work with queries and regular database operations. The book will not only guide you through design and implementation, but also help you monitor operations to achieve optimal performance and secure your MongoDB database systems. You’ll also be introduced to advanced techniques such as aggregation, map-reduce, complex queries, and generating ad hoc financial reports on the fly. Later, the book shows you how to work with multiple collections as well as embedded arrays and documents, before finally exploring key topics such as replication, sharding, and security using practical examples. By the end of this book, you’ll be well-versed with MongoDB 4.x and be able to perform development and administrative tasks associated with this NoSQL database.
Table of Contents (22 chapters)
1
Section 1: Essentials
5
Section 2: Building a Database-Driven Web Application
9
Section 3: Digging Deeper
13
Section 4: Replication, Sharding, and Security in a Financial Environment
14
Working with Complex Documents Across Collections

What this book covers

Chapter 1, Introducing MongoDB 4.x, provides a general introduction to MongoDB 4.x with a focus on new features and a brief high-level overview of the technology and the differences between MongoDB 4.x and MongoDB 3.

Chapter 2, Setting Up MongoDB 4.x, covers MongoDB 4.x and Python programming language drivers. In addition, this chapter shows you how to set up a demo test environment based upon Docker, in which you can practice working with MongoDB.

Chapter 3, Essential MongoDB Administration Techniques, shows how to perform administration critical to a properly functioning database using the mongo shell.

Chapter 4, Fundamentals of Database Design, describes moving from a set of customer requirements to a working MongoDB database design.

Chapter 5, Mission-Critical MongoDB Database Tasks, presents a series of common tasks and then shows you how to define domain classes that perform critical database access services including performing queries, adding, editing, and deleting documents.

Chapter 6, Using AJAX and REST to Build a Database-Driven Website, moves on to what is needed to have the application respond to AJAX queries and REST requests.

Chapter 7, Advanced MongoDB Database Design, covers how to define a dataset with complex requirements. You are also shown how MongoDB can be integrated with the popular Django web framework.

Chapter 8, Using Documents with Embedded Lists and Objects, covers working with the documents designed in the previous chapter, learning how to handle create, read, update and delete operations that involve embedded lists (arrays) and objects.

Chapter 9, Handling Complex Queries in MongoDB, introduces you to the aggregation framework, a feature unique to MongoDB. In this chapter, you also learn about map-reduce, geospatial queries, generating financial reports, and performing risk analysis.

Chapter 10, Working with Complex Documents across Collections, starts with a brief discussion on how to handle monetary data, after which the focus shifts to working with complex documents across multiple collections. Lastly, GridFS technology is introduced as a way of handling large files and storing documents directly in the database.

Chapter 11, Administering MongoDB Security, focuses on the administration needed to secure the database by creating database users, implement role-based access control and implement transport layer (SSL/TLS) security based upon x.509 certificates.

Chapter 12, Developing in a Secured Environment, looks into how to write applications that access a secured database using role-based access control and TLS security using x.509 certificates.

Chapter 13, Deploying a Replica Set, starts with an overview of MongoDB replication, after which you'll learn how to configure and deploy a replica set.

Chapter 14, Replica Set Runtime Management and Development, focuses on replica set management, monitoring, backup, and restore. In addition, it addresses how your application program code might change when accessing a replica set.

Chapter 15Deploying a Sharded Cluster, starts with an overview of sharding, after which you'll learn how to configure and deploy a sharded cluster.

Chapter 16, Sharded Cluster Management and Development, covers how to manage a sharded cluster as well as learning about the impact of sharding on application program code.