Welcome to the world of MongoDB. MongoDB is a highly popular NoSQL database. It is built for modern web applications.
NoSQL means "Not Only SQL". It represents a different way to store data. It does not use traditional tables and rows.
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.
It is incredibly fast for big data. It is highly scalable horizontally. It fits perfectly with JavaScript applications.
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.
Databases hold collections. Collections hold documents. Documents hold fields and values.
{
"_id": "12345",
"username": "intricatedevo",
"role": "admin",
"active": true,
"skills": [
"Node.js",
"MongoDB",
"React"
]
}
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.
MongoDB has a massive community. You can easily find answers to problems. There are excellent drivers for every language.
In the next chapters, you will write queries. You will learn how to interact with databases.
In what format does MongoDB natively store documents?