-
Book Overview & Buying
-
Table Of Contents
MongoDB Essentials
By :
Before you get started, you may be asking yourself: “What makes MongoDB different?”
To put it simply, MongoDB wasn’t built to follow trends or repackage old ideas. MongoDB reimagines how data should be handled in modern software, where systems evolve rapidly, operate globally, and work with structured and unstructured information side by side.
This book is a quick start for anyone who needs to get up and running with MongoDB. Whether you’re building software, managing systems, or evaluating how MongoDB fits into your stack, this book covers the fundamentals step by step. We’ll look at how MongoDB organizes data, runs queries, scales out, and integrates into modern workflows.
Each chapter builds your understanding of how MongoDB works by focusing on not just the mechanics, but the reasoning behind the design. You’ll learn how to think in terms of documents, model using access patterns, and apply design patterns that work from development to production.
Whether you’re just starting out or sharpening your understanding, this book will give you the clarity and confidence to use MongoDB effectively.
This book is designed to act as a quick-start guide if you’re new to MongoDB or need a refresher. It introduces key concepts through real-world examples, including data modeling principles, CRUD operations, the aggregation pipeline, and performance tips. This book also includes steps for setting up MongoDB, reducing friction, and giving you hands-on experience from the beginning of your journey.
This book is for anyone interested in using MongoDB, including developers, database administrators, system architects, students, managers, and decision-makers who want to familiarize themselves with what a modern database can offer. Whether you’re building your first application or exploring what MongoDB can offer you, this book serves as your first step on your MongoDB journey.
Chapter 1, MongoDB Architecture, explores the building blocks of MongoDB’s distributed design and familiarizes you with the document model, replica sets, and sharding.
Chapter 2, Getting Started with MongoDB, covers how to install the required tools, create a local deployment, and your first database and collection.
Chapter 3, Data Modeling, covers the fundamentals of schema design and data modeling in MongoDB.
Chapter 4, CRUD Operations, shows you how to interact with your data.
Chapter 5, Aggregation, shows you how to use the aggregation framework to perform complex data analysis efficiently.
Chapter 6, Performance Strategies and Tools, explains the tools available to ensure that your queries run fast and scale well.
Chapter 7, Intelligent Applications with MongoDB, covers the MongoDB tools that support the development of AI-based applications: Atlas Search and Atlas Vector Search.
You will require the following software:
|
Software covered in the book |
Operating system requirements |
|
MongoDB version 7.0 or newer |
Windows, macOS, or Linux |
|
MongoDB Shell (monogsh) |
Windows, macOS, or Linux |
After reading this book, we encourage you to check out some of the other resources available at https://learn.mongodb.com/.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781806706099.
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and X/Twitter handles. For example: “To insert a new book into the books collection, you use the insertOne command.”
A block of code is set as follows:
{
“title”: “Designing APIs with MongoDB”,
“author”: “Alex Smith”,
“genres”: [“Technology”, “Databases”],
“inStock”: true,
“publisher”: {
“name”: “MongoDB Press”,
“location”: “New York”
}
}
Any command-line input or output is written as follows:
brew install mongodb-atlas-cli
brew install mongosh
brew install mongodb-compass # Optional GUI
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Sharding is MongoDB’s approach to horizontal scaling.”
Warnings or important notes appear like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book or have any general feedback, please email us at [email protected] and mention the book’s title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you could report this to us. Please visit http://www.packt.com/submit-errata, click Submit Errata, and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packt.com/.
Once you’ve read MongoDB Essentials, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community, and will help us make sure we’re delivering excellent quality content.
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere?
Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily.
Follow these simple steps to get the benefits:

https://packt.link/free-ebook/9781806706099
Change the font size
Change margin width
Change background colour