0% completed
MongoDB Course Overview
On This Page
What You Will Learn
How You Check Your Understanding
Who This Course Is For
What You Need
Why Learn MongoDB
This course teaches you how to store, query, and organize data in MongoDB, and how to run MongoDB on more than one server. It assumes no earlier experience with databases. Each chapter uses what the chapters before it introduced, so the course works best when you read it in order.
What You Will Learn
The course has nine chapters after this overview:
- Introduction. What NoSQL means, the four main types of NoSQL database, what MongoDB is, and how it differs from a relational database.
- MongoDB Basics. Setting up a MongoDB server and the
mongoshshell, then databases, collections, and documents, then JSON, BSON, the data types MongoDB stores, ObjectId, and what a query is. - CRUD Operations. Inserting, reading, updating, and deleting documents, including queries on nested fields, on null or missing fields, and on arrays.
- Operators. The comparison, logical, arithmetic, field update, array, and string operators.
- Aggregation. The aggregation pipeline and its stages, including
$count,$first,$lookup, and$out, followed by updates that use a pipeline, pipeline limits, and the older map-reduce feature. - Indexing. Creating, listing, and dropping indexes, and the single-field, compound, multikey, text, and wildcard types.
- Transactions and Data Modeling. Designing documents, modeling relationships, embedding data, validating documents with JSON Schema, using transactions, and scaling.
- Replication and Sharding. Replica sets and their members, read and write behavior, sharded clusters, shard keys, hashed and ranged sharding, and change streams.
- MongoDB with Node.js. Connecting to MongoDB from a Node.js program and querying data from it.
How You Check Your Understanding
Each of the nine chapters ends with an assessment. Most hold 20 multiple-choice questions, and the Node.js chapter holds 12. Each attempt draws half of them, so a later attempt can show different questions. Most questions describe a situation, like a query that returns less than you expected, and ask what explains it. Every option has an explanation, so read them after you answer, including the explanations of the options you did not choose.
Who This Course Is For
The course suits two groups of readers. The first group is new to databases, or knows relational databases and has not used MongoDB. The second group is developers who are adding MongoDB to an application and want to understand how it behaves, not only which commands to type.
Database administrators and data analysts will also find the querying, indexing, aggregation, replication, and sharding chapters useful. However, the course does not teach backup procedures, user authentication, or encryption, so an administrator will need other material for those subjects.
What You Need
The commands run in mongosh, the MongoDB command-line shell, so you need access to a MongoDB server to try them yourself. The first lesson of the MongoDB Basics chapter, Setting Up MongoDB, shows two ways to get one: a free cluster on MongoDB Atlas, or the free Community Server on your own computer. Transactions and change streams need a replica set, which is a group of servers that keep copies of the same data, although a group of one server is enough. Most of the other examples run on a server without replication. The Node.js chapter assumes that you can read basic JavaScript.
Why Learn MongoDB
MongoDB is a widely used document database, meaning that it stores each record as a nested structure of fields instead of as a row in a table. This design suits applications whose records vary in shape, or whose related data is usually read together. It also supports splitting a large data set across many servers.
MongoDB is not the right choice for every application, and the course says so where the difference matters. After finishing it, you should be able to judge whether MongoDB fits an application, design its documents and indexes, and explain how your data behaves when it is copied across servers.
Reading Progress
0%
On This Page
What You Will Learn
How You Check Your Understanding
Who This Course Is For
What You Need
Why Learn MongoDB