MongoDB

Stage 1 · Lesson 8 of 8

Loading a sample dataset

Documents and your setup

Practise on realistic data from day one. In Atlas, the Load option adds several databases, such as sample_mflix (films, comments and users), sample_airbnb and sample_analytics. On a local server, download the same data and load it with the MongoDB Database Tools, such as mongorestore.

These datasets have thousands of documents with , , missing fields and uneven types, which tiny practice collections hide. Spend twenty minutes exploring before writing queries: list the collections, open a few documents, and use the Schema tab to see which fields are arrays and which are sometimes absent. The later stages use these collections for queries, and aggregation.

Common trappractising only on five documents you typed yourself, where every query looks correct and nothing is slow.

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?