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
- 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.
- 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.
- Projection: choosing fields
MongoDB projection: return only the fields you need with find({}, { name: 1 }), and why _id keeps showing up uninvited.