What is Mongodb – MongoDB is a JSON Like Structure DB, Which provides to store data in JSON Objects format in Database
In SQL we mainly use and work with relationships for data management that is called RDBMS(relational database management system).
We are choose No sql because it is non-relational and it is document-oriented database management system
Let’s say we want to store students’ information into a database.
In the relational database
No | Name | Class | Roll no |
1 | Rahul | CSE | 6 |
In mongo DB
[{
“_id”:1,
“Name”:”Rahul”,
“Class”:”CSE”,
“Roll no.”:6”
},
{
// Data
}]
Because of its simplicity and flexibility, MongoDB is getting more and more popular.
Either it MEAN, MEVN or MERN stack there M means MongoDB
MongoDB is based upon a NoSQL database and its working is much easier than with any other relational database. There are no tables in MongoDB which means, all the data is stored in JSON format,i.e. key-value pairs. In JSON, we define a unique key with a value correlated with it. These key-value pairs are stored in a document, which means all the data is stored in a collection.
A collection in MongoDB can have many documents and such documents can have any number of key-value pairs. As I discussed earlier, data in the MongoDB database is stored in BSON. BSON is nothing but extended JSON. It supports more data types than JSON. We contain anythinglikek, string, integer, boolean, binary data, object, array, javascript cod,,e and many more in a MongoDB document.
These documents are grouped inside a collection. A collection can be similar to a table in a relational SQL database. A collection always exists in a database and there is no predefined structure of a collection.In relational database management system, the database contains tables and in MongoDB, the database management system contains collections.
C: Create
R: Read
U: Update
D: Delete
This is the basic introduction of MongoDB. If you are interested in advanced knowledge related to this technology, then you visit at O7services ,we are providing online/offline MongoDB courses in jalandhar.
Leave a Reply