# What You Can Build with MongoDB

A database keeps an app's data safe and answers its questions in a blink, and MongoDB keeps each record as a document, like a filled-in recipe card, which suits recipe sites, store orders, pet adoption sites and the five projects you'll build in this course.

Novice · MongoDB · Database · Updated November 19, 2026

By Gregor Dzierzon

## After this lesson you can

- Explain what a database is for, and what MongoDB is, a document database that keeps each record as a document in a collection
- Name kinds of apps whose data fits documents, such as a recipe site, a store's orders and a pet adoption site, and say what one document holds

## Key takeaways

- A database is a program that keeps an app's data organized and safe, and finds, adds, changes and removes it for many people and programs at once.
- MongoDB is a document database. Each record is a document, a set of fields and their values, like one filled-in recipe card.
- A collection holds documents of one kind, such as recipes, and a database holds collections.
- Documents suit data that is read together and has lists inside it, such as a recipe with its ingredients or an order with its items.

Search a recipe app for "chicken", check on a bike part you ordered, or scroll through the dogs waiting at a shelter: each of those screens shows data that a program fetched a moment earlier. The app has to remember thousands of things and find the right few fast. You'll use what this course teaches whenever you build an app that needs to remember things, and nearly every app does.

This lesson shows what a database is for, what makes MongoDB different, and the projects you'll build with it.

## A box of recipe cards

Sunday Kitchen is a small recipe website run by two friends, Maya and Leo. For years their recipes lived on index cards in a wooden box. The box worked while it sat on the kitchen counter. Then the website came along, and the cards started to cause trouble:

- A visitor asks for every dinner that takes 30 minutes or less, and somebody has to read all 40 cards to answer.
- Maya wants to fix a typo on a card while Leo is reading it out to a visitor.
- A card gets coffee spilled on it, and the recipe is gone.
- The website can't read index cards at all.

Each problem has the same answer: put the recipes somewhere a program can keep them safe, and ask it questions.

## What a database is for

A **database** is that somewhere: a program that keeps an app's data organized and safe, and answers questions about it fast. When the website asks "which dinners take 30 minutes or less?", the database finds them in a blink, without anybody reading cards. It adds, changes and removes records when asked, for many people and programs at the same time, and it keeps them on disk, so nothing is lost when the computer restarts.

## MongoDB keeps documents

There are many databases. **MongoDB** stands out for how it keeps each record: as a **document**, which looks a lot like a filled-in recipe card. Here is one of Sunday Kitchen's recipes, the way MongoDB shows it:

```text
{ name: 'Saturday Pancakes', meal: 'breakfast', minutes: 25 }
```

Each part, such as `minutes: 25`, is a **field**: a name (`minutes`) and its **value** (`25`), the way a card has a line for the cooking time with the time written on it. The braces `{ }` around them (read "braces") hold the whole card together. The next chapter, *Documents and Why They Fit*, explains every brace, colon and quote.

![A handwritten index card for Saturday Pancakes, with lines for the meal, breakfast, and the time, 25 minutes, beside the same recipe as a document in braces with three fields, name, meal and minutes, each line of the card matched to its field](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/23eab6817a3e4d0db97cf855b582e61f.webp)

Documents are kept in groups, the way cards are kept in a box:

- A **collection** holds documents of one kind. Sunday Kitchen's recipes go in a collection named `recipes`.
- A **database** holds collections. Sunday Kitchen's database, `sunday_kitchen`, could hold `recipes` today and `reviews` later.

Because each record is a document, MongoDB is called a **document database**. Many other databases keep records as rows in tables, like a spreadsheet; the next chapter compares the two honestly, including when a table is the better choice.

## Apps whose data fits documents

Documents suit data that's read together and has lists inside it: a recipe and its ingredients, an order and the items in it. Some apps whose data fits documents well:

| App | What one document holds |
|---|---|
| A recipe site | One recipe: its name, time, ingredients and steps |
| An online store | One order: who bought it, each item with its price, and the total |
| A pet adoption site | One pet: its name, age and photos, and whether it's been adopted |
| A game | One player: their name, level and the items they've collected |
| A blog | One post: its title, its text and the comments under it |

Developers who build the back end of apps (the part on a server, out of sight) write MongoDB queries every day. So do full-stack developers, who build both the page and the server behind it.

## What you'll build in this course

Each module ends with a project, a **mini-capstone**, that puts the whole module to work. Each one is its own project, with its own starter files.

- **Recipe Collection** (Module 1). Twenty recipes stored as documents with the right types, and five questions about them answered with queries.
- **Recipe Search** (Module 2). A recipe search with filters for cuisine, time, an ingredient and a rating, sorted and shown a page at a time.
- **Bike Shop Store Model** (Module 3). A whole online store for Riverbend Bike Shop, modeled as documents, with a one-page write-up explaining each choice.
- **Sales Report** (Module 4). A dashboard's numbers, such as monthly sales and best sellers, worked out from 200,000 orders and made fast.
- **Pet Adoption Data Layer** (Module 5). The code that keeps the Maple Street Pet Adoption Center's pets and applications in MongoDB, behind a web API you're given.
- **Your own API** (the final capstone). An app's data of your own design, with a write-up of when you'd choose a table-based database instead.

## Check yourself

2 questions to try on the lesson page.

## So what

Every app that remembers things has a database behind it, and MongoDB keeps each record as a document, one card per recipe, order or pet. By the end of this course you'll have built five projects on it.

## Key terms

- [Database](https://www.ask-codey.com/glossary/database)
- [MongoDB](https://www.ask-codey.com/glossary/mongodb)
- [Document Database](https://www.ask-codey.com/glossary/document-database)
- [Document in MongoDB](https://www.ask-codey.com/glossary/document-in-mongodb)
- [Collection in MongoDB](https://www.ask-codey.com/glossary/collection-in-mongodb)
- [Database in MongoDB](https://www.ask-codey.com/glossary/database-in-mongodb)

## Related

- [How This Course Works](https://www.ask-codey.com/lessons/mongodb-how-this-course-works)
- [Your First Documents in mongosh](https://www.ask-codey.com/lessons/mongodb-first-documents-in-mongosh)

Source: https://www.ask-codey.com/lessons/mongodb-what-you-can-build
