Search This Blog

Friday, September 26, 2025

Notes

  • MongoDB is a document database. It stores data in a type of JSON format called BSON
  • A record in MongoDB is Document. eg 
{
title: "Post Title 1",
body: "Body of post.",
category: "News",
likes: 1,
tags: ["news", "events"],
date: Date()
}

  •  Query db.posts.find( {category: "News"} ) will find all the documents (Records) in database with key-Category and Value - "News"
  •  In MongoDB, instead of tables these are called collections.
  • The MongoDB Query API is the way you will interact with your data.
    • CRUD Operations
    • Aggregation Pipelines

No comments:

Post a Comment

Q6-Q10

Q6:  What is the difference between MongoDB and a relational database? Q7:  What are the limitations of MongoDB? How do you handle them? Q8:...