Someone asks you, “What is MongoDB?” and you say, “MongoDB is a NoSQL database.”
Now, the person thinks you don’t really understand MongoDB.
Why?
Because your answer is too broad to explain what MongoDB really is.
The question you need to interpret is: “What is MongoDB, really?”
In general terms, you know MongoDB is a database. But what is it, really?
More technically, MongoDB is a document-oriented, general-purpose NoSQL data management system that stores data as BSON documents organized into collections.
Too technical? 🤦♂️🤦♂️ Right?
Let’s discuss all these terms.
Firstly, what does NoSQL mean?
You probably work with SQL databases. You write SQL queries, work with tables, and store data in rows and columns.
You might also be familiar with writing queries like SELECT, INSERT, UPDATE, and DELETE to work with your data.
This category is called SQL databases. But there is another category called NoSQL databases, which do not rely on the traditional relational database model.
Document-oriented
If you work with web requests, you are probably familiar with JSON data, which contains fields and values. Similarly, MongoDB represents data as JSON-like documents containing fields and values.
BSON
BSON is similar to JSON, but it represents data in binary form and also supports additional data types.
Collection
A collection is a logical grouping of documents. It is similar to a table in a relational database.
Now, you can explain MongoDB beyond just calling it a database.