MongoDB

Stage 1 · Lesson 2 of 8

When MongoDB fits, and when it does not

Documents and your setup

MongoDB fits data that is read and written as whole units: a product with its variable attributes, a user profile, an event log, content with nested sections. It also scales out across machines when a single server is not enough. It is a poor fit for highly relational data that you query from many directions, such as a school system where students, courses, teachers and rooms all link to each other, and for work built around transactions across many entities, such as double-entry accounting.

MongoDB supports joins and , but relying on them everywhere means you are paying for a while working against it. A is often the sensible default.

Common trapchoosing MongoDB because feels familiar, then rebuilding joins and constraints by hand in application code.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with

  • CourseFree
    MongoDB University

    MongoDB

    Free: start with the introduction to MongoDB and Atlas setup lessons, which use the same sample data

Practise

  • Paste a few documents and a query and run it in the browser, no install needed

Keep handy

  • The mongosh docs: connecting, running scripts and the shell helpers such as show and use

  • The Compass docs for the Schema, Explain Plan and Aggregations tabs you will use later

Also worth your time

Mark this stage as not done?