Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Official MongoDB Guide

You're reading from   The Official MongoDB Guide Resilience, scalability, security and performance

Arrow left icon
Product type Paperback
Published in Sep 2025
Publisher Packt
ISBN-13 9781837021970
Length 368 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (7):
Arrow left icon
Rachelle Palmer Rachelle Palmer
Author Profile Icon Rachelle Palmer
Rachelle Palmer
Jeffrey Allen Jeffrey Allen
Author Profile Icon Jeffrey Allen
Jeffrey Allen
Parker Faucher Parker Faucher
Author Profile Icon Parker Faucher
Parker Faucher
Alison Huh Alison Huh
Author Profile Icon Alison Huh
Alison Huh
Lander Kerbey Lander Kerbey
Author Profile Icon Lander Kerbey
Lander Kerbey
Maya Raman Maya Raman
Author Profile Icon Maya Raman
Maya Raman
Lauren Tran Lauren Tran
Author Profile Icon Lauren Tran
Lauren Tran
+3 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction to MongoDB 2. MongoDB Architecture FREE CHAPTER 3. Developer Tools 4. Data Modeling and Index Optimization 5. Queries 6. Database Operations 7. Security 8. MongoDB Atlas 9. Atlas Search 10. Other Books You May Enjoy
11. Index

Document data model

The document data model is a way of structuring and storing data where information is kept in self-contained, flexible documents. The document data model provides the following benefits:

  • Self-contained documents: You can model your schema so each document stores all related data together, which reduces the need for complex joins.
  • Flexibility: Documents can have varying structures and data types.
  • Embedded data: Documents can contain embedded objects and arrays, which enables you to easily model complex entity relationships such as one-to-many and many-to-many.

The following sample document illustrates MongoDB’s document data structure:

{
  "_id": ObjectId("650d9b7fb6a6f4f8d45ce0b8"),
  "username": "johndoe",
  "email": "johndoe@example.com",
  "profile": {
    "firstName": "John",
    "lastName": "Doe",
    &quot...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
The Official MongoDB Guide
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon