Introduction to MongoDB and NoSQL — Day 1
Shifa

Shifa @shifa_2

About: I'm a Computer Science student passionate about Data Structures & Algorithms and software development. I enjoy solving complex problems, building efficient solutions, and constantly learning new tech

Joined:
Apr 12, 2025

Introduction to MongoDB and NoSQL — Day 1

Publish Date: Aug 31
7 4

Lets not waste our time on intro directly dive deep into the concept

What is MongoDB?

MongoDB is a NoSQL database that stores data in a flexible, JSON-like format called documents. Unlike traditional databases that require structured tables and fixed columns, MongoDB allows you to store varied data structures within the same collection.

MongoDB is often used in the backend of applications to manage and store data, but it’s important to note that MongoDB itself is not a backend framework — it is strictly a database.


What Does “NoSQL” Mean?

Many people think "NoSQL" means “no SQL,” but that’s not entirely accurate.

NoSQL actually stands for “Not Only SQL”, and it refers to a class of databases that break away from traditional relational models.

Instead of storing data in rows and columns (like in MySQL or PostgreSQL), NoSQL databases store data in formats like:

  • Key-value pairs
  • Wide-column stores
  • Graph databases
  • Document-oriented databases (like MongoDB)

SQLvsNOsql

SQL vs NoSQL — What's the Difference?

Here’s a quick comparison to help you understand how MongoDB differs from traditional SQL databases:

Feature SQL (Relational DB) NoSQL (MongoDB)
Data Structure Tables (Rows & Columns) Documents (JSON-like)
Schema Fixed Flexible (Schema-less)
Relationships Joins, Foreign Keys Embedding or Referencing
Scalability Vertical (scale-up) Horizontal (scale-out)
Best For Structured data Dynamic, unstructured data
Examples MySQL, PostgreSQL MongoDB, CouchDB, Cassandra

MongoDB Structure: Key Terminology

Let’s break down the three most important terms you’ll encounter in MongoDB:

  • Document: A single data record stored in JSON or BSON format. Example:
  { "name": "Shifa", "roll no": 21, "email": "shifa@example.com" }
Enter fullscreen mode Exit fullscreen mode
  • Collection: A group of related documents, similar to a table in SQL.

  • Database: A container for collections — the top-level structure in MongoDB.


Why MongoDB is Flexible

In SQL, all records in a table must follow the same schema — same columns, same types. In MongoDB, this restriction doesn’t exist.

You can store documents with different structures in the same collection.

For example:

{ "name": "sahil", "age": 25 }
{ "name": "sam", "email": "sam@example.com" }
Enter fullscreen mode Exit fullscreen mode

These two documents live in the same collection, but they have different fields — and that’s completely valid in MongoDB.


What You’ll Do Today

As part of Day 1, here’s what students should do to get hands-on experience:

1. Install MongoDB

2. Explore MongoDB Compass

  • MongoDB Compass is a GUI that helps you view databases and documents.
  • Use it to create a new database and insert your first document.

3. Insert a Document

Example:

{
  "name": "Shifa",
  "roll no": 21,
  "course": "MongoDB Basics"
}
Enter fullscreen mode Exit fullscreen mode

Congratulations — you’ve just added your first record to a NoSQL database!


References -
https://www.mongodb.com/resources/basics/unstructured-data/schemaless
https://www.integrate.io/blog/the-sql-vs-nosql-difference/
https://www.mongodb.com/resources/basics/databases/nosql-explained

Comments 4 total

  • Shifa
    ShifaAug 31, 2025

    Visit the refrences for more details

  • davinceleecode
    davinceleecodeSep 1, 2025

    This post really made me install MongoDB... awesome article shifa! 😉

    • Shifa
      ShifaSep 2, 2025

      "Haha, love to hear that! Welcome to the MongoDB club "

  • garry hill
    garry hillSep 2, 2025

    HOW I SAVED MY RELATIONSHIP IN JUST 24 HOURS...CONTACT THE SPELL CASTER VIA THE WHATSAPP +2347071347485
    EMAIL: {drituasteven@gmail. com}

    I was on the verge of losing everything…until I turned to spiritual help.I loved my husband deeply but out of nowhere he grew cold, distant and uninterested in our marriage. We were drifting apart fast and divorce seemed inevitable no matter what I did nothing worked. My heart was shattered but something inside me said: This love is worth fighting for.

    Then the truth came to light: A woman from his workplace had used dark voodoo to pull him away from me. She was spiritually manipulating him and I had no idea. That’s when I discovered Dr. Itua is a powerful and genuine spell caster who changed everything.Within 24 hours of contacting him Dr. Itua reversed the evil spell. My husband came back to me loving, attentive, loyal and completely obsessed. He now cherishes me, respects me and shows me affection like never before and the other woman? Her influence disappeared. Her spell was completely destroyed.But here’s what amazed me even more: I learned that Dr. Itua doesn’t only help with love issues. He casts a wide range of powerful effective spells for different problems his clients face. I saw countless testimonials from people around the world. Here are just some of the spells Dr. Itua offers:

    Revenge or death spell to destroy your enemy

    Love & Relationship Spells

    Marriage Restoration Spells

    Breakup/Separation Spells

    Attraction & Obsession Spells

    Divorce Prevention Spells

    Fertility & Pregnancy Spells

    Job & Career Success Spells

    Business & Financial Prosperity Spells

    Protection Spells (from evil eyes, curses, spiritual attacks)

    Healing & Health Spells

    Court Case & Legal Favor Spells

    Bad Luck Removal & Cleansing Rituals

    Whether you’re facing heartbreak, financial setbacks, spiritual attacks, or simply need a major breakthrough, Dr. Itua has the spiritual power to help you. He is real. He is powerful. And his work speaks for itself.

    Contact Dr. Itua Today

    WhatsApp: +2347071347485

    Email: {drituasteven@gmail. com} Don’t wait until it’s too late. Take control of your destiny and fight for your happiness today.

Add comment