Home 1. What is MongoDB?
Post
Cancel

1. What is MongoDB?

What is a MongoDB Database?

A database, meaning a structured way to store and access data. More specifically, it is a NoSQL database. NoSQL databases mean that it doesn’t use the traditional approach of storing data in tables such as in SQL databases. This means that you’re storing your data in an organized way, but not in rows and columns like in a table. An example of NoSQL database can be anything from a library card catalog, to a more sophisticated store like MongoDB.

MongoDB is a NoSQL document database which means that inside MongoDB data are stored inside documents. These documents are in turn stored in what we call collections of documents. MongoDB uses a structured way to store and access data.That is why MongoDB is categorized as a NoSQL document database.

What is a Document?

A document is a way to organize and store data as a set of field-value pairs. Example:

1
2
3
4
{
    <field> : <value>,
    <field> : <value>
}

Just like this, where the field is a unique identifier for some data point, and the value is data related to a given identifier.

1
2
3
4
5
{
    'name': 'Babin',
    'title': 'Software Engineer Associate Trainee',
    'company': 'Fusemachines'
}

In the above example, there is a field name, and the value is Babin.

A collection would contain many such documents. A collection is an organized store of documents in MongoDB, usually with common fields between documents.

And a database would contain multiple collections.

What is MongoDB Atlas?

The Atlas Cloud database is a fully managed database built for wide range of applications with MongoDB at its core. Atlas helps you visualize, analyze, export, and build applications with your data. It has many different services and tools availbale within it which uses MongoDB databse for data storage and retrieval.

Atlas users can deploy clusters-which are groups of servers that store your data. These servers are configure in what we call a replicate set-which is a set of few connected MongoDB instances that store a same data. An instance is a single machine locally or in the cloud, running a certain software. This set up ensure that if something happens to one of the machines in the replica set, the data will remain intact and available for use by the applicaiton by the remaining working members of the replica set. So everytime you make changes to a document or a collection, redundant copies of that data are stored within the replica set.

This post is licensed under CC BY 4.0 by the author.