Stage 1 · Lesson 1 of 8
Documents, fields and the document model
MongoDB stores data as documents: records made of and value pairs that look like JSON objects. A value can be a string, a number or a date, but also a or an (a list), so one customer document can hold its addresses inline.
Documents live in , and collections live in databases. Unlike a relational table, a collection does not force every document to have the same fields. That flexibility lets you shape each document around how the application reads it, often fetching everything a page needs in one query. It is also why data modelling matters so much later: nothing stops you storing a mess.
Common traphearing "" and deciding you need no design at all, when the schema has simply moved from the database into your application code.
A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock
Resources for this stage
Start with
- CourseFreeMongoDB University
MongoDB
Free: start with the introduction to MongoDB and Atlas setup lessons, which use the same sample data
Practise
Keep handy
Also worth your time
A balanced comparison of where a document database fits and where a relational one wins