Free · 27 Topics · No Signup
MongoDB Notes
Document database — queries, aggregations, indexes and Node.js drivers — written by CodingNow 2.0's mentors. Free to read, structured to actually help you learn.
MongoDB notes by CodingNow 2.0 cover 27 topics — from mongodb home to mongodb charts — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, MongoDB interviews and CodingNow 2.0's mentor-led MongoDB course in Pitampura, Delhi.
No notes found. Try a different search term, or browse all MongoDB notes.
MongoDB Tutorial
27 of 27 topics publishedMongoDB HOME
MongoDB is a document database. It stores data in a type of JSON format called BSON.
MongoDB Get Started
MongoDB is a document database and can be installed locally or hosted in the cloud.
MongoDB Query API
The MongoDB Query API is the way you will interact with your data.
MongoDB Create DB
After connecting to your database using mongosh , you can see which database you are using by typing db in your terminal.
MongoDB Collection
You can create a collection using the createCollection() database method.
MongoDB Insert
There are 2 methods to insert documents into a MongoDB database.
MongoDB Find
There are 2 methods to find and select data from a MongoDB collection, find() and findOne() .
MongoDB Update
To update an existing document we can use the updateOne() or updateMany() methods.
MongoDB Delete
We can delete documents by using the methods deleteOne() or deleteMany() .
MongoDB Query Operators
There are many query operators that can be used to compare and reference document fields.
MongoDB Update Operators
There are many update operators that can be used during document updates.
MongoDB Aggregations
Aggregation operations allow you to group, sort, perform calculations, analyze data, and much more.
$group
This aggregation stage groups documents by the unique _id expression provided.
$limit
This aggregation stage limits the number of documents passed to the next stage.
$project
This aggregation stage passes only the specified fields along to the next aggregation stage.
$sort
This aggregation stage groups sorts all documents in the specified sort order.
$match
This aggregation stage behaves like a find. It will filter documents that match the query provided.
$addFields
This aggregation stage adds new fields to documents.
$count
This aggregation stage counts the total amount of documents passed from the previous stage.
$lookup
This aggregation stage performs a left outer join to a collection in the same database.
$out
This aggregation stage writes the returned documents from the aggregation pipeline to a collection.
MongoDB Indexing/Search
MongoDB Atlas comes with a full-text search engine that can be used to search for documents in a collection.
MongoDB Validation
By default MongoDB has a flexible schema. This means that there is no strict schema validation set up initially.
MongoDB Data API
The MongoDB Data API can be used to query and update data in a MongoDB database without the need for language specific drivers.
MongoDB Drivers
The MongoDB Shell (mongosh) is great, but generally you will need to use MongoDB in your application. To do this, MongoDB has many language drivers.
MongoDB Node.js Driver
For this tutorial, we will use a MongoDB Atlas database. If you don't already have a MongoDB Atlas account, you can create one for free at MongoDB Atlas.
MongoDB Charts
MongoDB Charts lets you visualize your data in a simple, intuitive way.
Ready to go from notes to a real career?
Join CodingNow 2.0's MongoDB course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo AvailableMongoDB Notes – FAQs
What students search before reading MongoDB notes.