What is MongoDB

What is Mongodb – MongoDB  is a JSON Like Structure  DB, Which provides to store data in JSON Objects format in Database

MONGODB is an NoSql data Format

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

  • In  SQL databases we save  data in table format.
  • In No SQL we save data in the form of a document.

or example:

Let’s say we want to store students’ information into a database.

In the relational database

In Relational Database

No Name Class Roll no
1 Rahul CSE 6

In mongo DB

[{

“_id”:1,

“Name”:”Rahul”,

“Class”:”CSE”,

“Roll no.”:6”

},

{

// Data

}]

In SQL :

  1. Table
  2. Row
  3. Column

In No SQL:

  1. Collection
  2. Document
  3. Fields

Because of its simplicity and flexibility, MongoDB is getting more and more popular.

Either it MEAN, MEVN or MERN stack there M means MongoDB

How does MongoDb work?

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.

What is Mongodb in Big Data

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. 

Features of MongoDb

  • Document Oriented Storage −All  data is saved in the form of JSON format.
  • Index on any attribute
  • Replication and high availability
  • Auto-Sharding
  • Rich queries
  • Fast in-place updates
  • Professional support by MongoDB

Main Advantages of MongoDb

  • Big Data
  • Content Management and Delivery
  • Mobile and Social Infrastructure
  • User Data Management
  • Data Hub

MongoDB CRUD Operation

       C: Create 

       R: Read

       U: Update

       D: Delete

Important  Terms in MongoDb

  • Document
  • Collection
  • Database
  • Json 
  • Bson 
  • Key Pair Value
  • _id

Conclusion

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