querydrill

Learn › MongoDB fundamentals

Documents and find()

How MongoDB stores data, and how to read it back.

By the end: Read documents out of a collection and control which fields come back.

Lessons

3
  1. How MongoDB stores data

    MongoDB stores documents in collections, not rows in tables. What that changes about how you model, nest and query your data.

  2. find() and findOne()

    How to read documents out of a MongoDB collection with find() and findOne(), and how each one differs from a SQL SELECT.

  3. Projection: choosing fields

    MongoDB projection: return only the fields you need with find({}, { name: 1 }), and why _id keeps showing up uninvited.

Drills

1 easy
Start reading →Skip to the drills