An Introduction to MongoDB
MongoDB is an open-source, document oriented, NoSQL database developed by MongoDB Inc. MangoDB does not contain tables to store data like the traditional SQL-based databases did. lt stores all its data as documents which has a structure similar to JSON objects.
As the official documentation states, MongoDB is a scalable and flexible Database that allows the user to store data in JSON-like file format.
In a world where SQL-based databases are perfected upto the last spec, the existence of NoSQL databases might feel redundant. However, the uses of a NoSQL databases are far from few. Where relational databases like oracle or MySQL has tables where everything should be related to each other to be able to find any useful related data, NoSQL databases such as MongoDB has a document system where a single document is equal to a row in a relational database. The difference being the NoSQL databases are much more agile and can be altered by each document alone. each of these documents can have a different number of fields, sizes or content.
The documents in these databases doesn't need pre-defined schema. Their fields can be created on-the-go as the database documents are created. The data model implemented in the NoSQL databases allow users to show hierarchical relationships, store arrays, and other complex structures easily.
As the official documentation states, MongoDB is a scalable and flexible Database that allows the user to store data in JSON-like file format.
In a world where SQL-based databases are perfected upto the last spec, the existence of NoSQL databases might feel redundant. However, the uses of a NoSQL databases are far from few. Where relational databases like oracle or MySQL has tables where everything should be related to each other to be able to find any useful related data, NoSQL databases such as MongoDB has a document system where a single document is equal to a row in a relational database. The difference being the NoSQL databases are much more agile and can be altered by each document alone. each of these documents can have a different number of fields, sizes or content.
The documents in these databases doesn't need pre-defined schema. Their fields can be created on-the-go as the database documents are created. The data model implemented in the NoSQL databases allow users to show hierarchical relationships, store arrays, and other complex structures easily.
Sample MongoDB Document |
Why MongoDB?
Apart form being a NoSQL database, MongoDB has a few tricks up its sleeve to give it an edge over the other NoSQL databases. Notably;
- Easy installation and set up
- Uses BSON, which is a similar format to JSON to store documents.
- Very easy to map individual documents to an application code.
- It has comparatively high availability and scalability.
- It's free, open source and is actively maintained by MongoDB Inc. and an active community.
MongoDB has managed to overcome the limitations of traditional databases using an unconventional methods.
Comments
Post a Comment