MongoDB Get Started

MongoDB: Get Started

Welcome to the world of MongoDB. MongoDB is a highly popular NoSQL database. It is built for modern web applications.

What is NoSQL?

NoSQL means "Not Only SQL". It represents a different way to store data. It does not use traditional tables and rows.

JSON Documents

MongoDB stores data in flexible documents. These documents look exactly like JSON objects. They use a format called BSON underneath. BSON stands for Binary JSON.

Why Choose MongoDB?

It is incredibly fast for big data. It is highly scalable horizontally. It fits perfectly with JavaScript applications.

MongoDB Atlas

You can run MongoDB on your own computer. However, most people use MongoDB Atlas today. Atlas is the official cloud database service. It manages backups and security for you.

Understanding Structure

Databases hold collections. Collections hold documents. Documents hold fields and values.

Document Example:

{
  "_id": "12345",
  "username": "intricatedevo",
  "role": "admin",
  "active": true,
  "skills": [
    "Node.js",
    "MongoDB",
    "React"
  ]
}

Flexibility

Documents in the same collection can be different. One document might have a "phone" field. Another document might not need it. This flexibility speeds up software development.

Community Support

MongoDB has a massive community. You can easily find answers to problems. There are excellent drivers for every language.

Next Steps

In the next chapters, you will write queries. You will learn how to interact with databases.

Exercise

In what format does MongoDB natively store documents?