

{"id":47545,"date":"2019-01-15T11:28:41","date_gmt":"2019-01-15T05:58:41","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=47545"},"modified":"2023-08-14T16:57:39","modified_gmt":"2023-08-14T11:27:39","slug":"why-mongodb","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/why-mongodb\/","title":{"rendered":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB"},"content":{"rendered":"<p>As we see in today\u2019s world that most of the people are switching to MongoDB, there are still many who prefer to use a traditional relational database. Here, we will discuss why MongoDB should we choose? Like every coin has two faces, it has own benefits and limitations.<\/p>\n<p>So, are you ready to explore the reasons to learn MongoDB?<\/p>\n<h3>Why MongoDB?<\/h3>\n<p>As it is a NoSQL database, that&#8217;s why it has many reasons to learn MongoDB. These reasons have led the foundation to the worldwide popularity of MongoDB.<\/p>\n<p>These are some reasons, of why MongoDB is popular.<\/p>\n<ul>\n<li>Aggregation Framework<\/li>\n<li>BSON Format<\/li>\n<li>Sharding<\/li>\n<li>Ad-hoc Query<\/li>\n<li>Capped Collection<\/li>\n<li>Indexing<\/li>\n<li>File Storage<\/li>\n<li>Replication<\/li>\n<li>MongoDB Management Service (MMS)<\/li>\n<\/ul>\n<div id=\"attachment_47548\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47548\" class=\"size-full wp-image-47548\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01.jpg\" alt=\"Why MongoDB should we learn\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Reasons-to-learn-MongoDB-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-47548\" class=\"wp-caption-text\">Top Reasons to learn MongoDB<\/p><\/div>\n<h4>i) Aggregation framework<\/h4>\n<p>We can use it in a very efficient manner by MongoDB. <strong>MapReduce<\/strong> can be used for batch processing of data and also for aggregation operations. MapReduce is nothing but a process, in which large datasets will process and generate results with the help of parallel and distributed algorithms on clusters.<\/p>\n<p>It consists of two sets of operations in itself, they are: Map() and Reduce().<\/p>\n<ul>\n<li><strong>Map():<\/strong> It performs operations like filtering the data and then performing sorting on that dataset.<\/li>\n<li><strong>Reduce():<\/strong> It performs the operation of summarizing all the data after the map() operation.<\/li>\n<\/ul>\n<div id=\"attachment_47565\" style=\"width: 412px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47565\" class=\"size-full wp-image-47565\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-1.png\" alt=\"Aggregation Framework in MongoDB\" width=\"402\" height=\"125\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-1.png 402w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-1-150x47.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-1-300x93.png 300w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/a><p id=\"caption-attachment-47565\" class=\"wp-caption-text\">Aggregation Framework<\/p><\/div>\n<h4>ii) BSON format<\/h4>\n<p>It is JSON-like storage a format. <strong>BSON stands for Binary JSON<\/strong>. BSON is binary-encoded serialization of JSON like <strong>documents<\/strong> and MongoDB uses it, when to stores documents in collections. We can add data types like date and binary (JSON doesn&#8217;t support).<\/p>\n<p>BSON format makes use of _id as a primary key over here. As stated that _id is being used as a primary key so it is having a unique value associated with itself called as ObjectId, which is either generated by application driver or MongoDB service.<\/p>\n<p>Below is an example to understand BSON format in a more better way:<\/p>\n<p><strong>Example-<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">{\r\n\"_id\": ObjectId(\"12e6789f4b01d67d71da3211\"),\r\n\"title\": \"Key features Of MongoDB\",\r\n\"comments\": [\r\n...\r\n]\r\n}<\/pre>\n<p>Another advantage of using BSON format is that it enables to internally index and map document properties. As it is designed to be more efficient in size and speed, it increases the read\/write throughput of MongoDB.<\/p>\n<h4>iii. Sharding<\/h4>\n<p>The major problem with any web\/mobile application is scaling. To overcome this MongoDB has added sharding feature. It is a method in which, data is being distributed across multiple machines. Horizontal scalability is being provided with the sharding.<\/p>\n<p>It is a complicated process and is done with the help of several shards. Each shard holds some part of data and functions as a separate <strong>database<\/strong>. Merging all the shards together forms a single logical database. Operations over here are being performed by query routers.<\/p>\n<h4>iv. Ad hoc queries<\/h4>\n<p>MongoDB supports range query, regular expression and many more types of searches. Queries include user-defined Javascript functions and it can also return specific fields from the documents. MongoDB can support ad hoc queries by using a unique query language or by indexing BSON documents.<\/p>\n<p>Let\u2019s see the difference between SQL SELECT query and resembling query:<\/p>\n<p>E.g. Fetching all records of student table with student name like ABC.<\/p>\n<ul>\n<li><strong>SQL Statement &#8211;<\/strong> SELECT * FROM Students WHERE stud_name LIKE &#8216;%ABC%&#8217;;<\/li>\n<li><strong>MongoDB Query &#8211;<\/strong> db.Students.find({stud_name:\/ABC\/ });<\/li>\n<\/ul>\n<h4>v. Schema-Less<\/h4>\n<p>As it is a schema-less database(written in C++), it is much more flexible than the traditional database. Due to this, the data does not require much to set up for itself and reduced friction with OOP. If you want to save an object, then just serialize it to JSON and send it to MongoDB.<\/p>\n<h4>vi. Capped Collections<\/h4>\n<p>MongoDB supports capped collection, as it is having fixed <strong>size of collections<\/strong> in it. It maintains the insertion order. Once the limit is reached it starts behaving like a circular queue.<\/p>\n<p>Example &#8211; Limiting our capped collection to 2MB<\/p>\n<ul>\n<li>db.createCollection(\u2019logs\u2019, {capped: true, size: 2097152})<\/li>\n<\/ul>\n<h4>viii. Indexing<\/h4>\n<p>To improve the performance of searches<strong> indexes are being created<\/strong>. We can index any field in MongoDB document either primary or secondary.<\/p>\n<p>Due to this reason, the database engine can efficiently resolve queries.<\/p>\n<div id=\"attachment_47566\" style=\"width: 920px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47566\" class=\"size-full wp-image-47566\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2.png\" alt=\"MongoDB Indexing\" width=\"910\" height=\"260\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2.png 910w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2-150x43.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2-300x86.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2-768x219.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-2-520x149.png 520w\" sizes=\"auto, (max-width: 910px) 100vw, 910px\" \/><\/a><p id=\"caption-attachment-47566\" class=\"wp-caption-text\">Indexing<\/p><\/div>\n<h4>viii. File Storage<\/h4>\n<p>MongoDB can also be used as a file storing system, which avoids load imbalance and also data replication. This function performed with the help of <strong>Grid File System<\/strong>, it is included in drivers which stores files.<\/p>\n<div id=\"attachment_47567\" style=\"width: 738px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47567\" class=\"size-full wp-image-47567\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3.png\" alt=\"MongoDB File Storage\" width=\"728\" height=\"546\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3.png 728w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3-150x113.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3-300x225.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-3-520x390.png 520w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><p id=\"caption-attachment-47567\" class=\"wp-caption-text\">File Storage in MongoDB<\/p><\/div>\n<h4>ix. Replication<\/h4>\n<p>Replication is being provided by distributing data across different machines. It can have one primary node and more than one secondary nodes in it (replica set).<\/p>\n<p>This set acts like a master-slave. Here, a master can perform read and write and a slave copies data from a master as a backup only for a read operation.<\/p>\n<div id=\"attachment_47568\" style=\"width: 507px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-4.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47568\" class=\"size-full wp-image-47568\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-4.png\" alt=\"MongoDB Replication\" width=\"497\" height=\"377\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-4.png 497w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-4-150x114.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-4-300x228.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><p id=\"caption-attachment-47568\" class=\"wp-caption-text\">Replication<\/p><\/div>\n<h4>x. MongoDB Management Service (MMS)<\/h4>\n<p>MongoDB has a very powerful feature of MMS, due to which we can track our databases or machines and if needed can backup our data. It also tracks hardware metrics for managing the deployment.<\/p>\n<p>It provides a feature of custom alert, due to which we can discover issues before our MongoDB instance will affect.<\/p>\n<div id=\"attachment_47569\" style=\"width: 690px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47569\" class=\"size-full wp-image-47569\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5.png\" alt=\"MongoDB Management Service (MMS)\" width=\"680\" height=\"348\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5.png 680w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5-150x77.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5-300x154.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-5-520x266.png 520w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><p id=\"caption-attachment-47569\" class=\"wp-caption-text\">MongoDB Management Service (MMS)<\/p><\/div>\n<h3>Benefits of MongoDB<\/h3>\n<p>This is the<strong> second phase of Why MongoDB, advantages.<\/strong><\/p>\n<h4>i. Load Balancing<\/h4>\n<p>If you are having a large set of data that you need to process then you can distribute the traffic amongst different machines with the help of load balancing.<\/p>\n<p>It helps the user in a way that you can continue your work even if one of the nodes\/machines has stopped working due to some reason. The other nodes will keep the work in a continuation and your processing will not stop.<\/p>\n<div id=\"attachment_47570\" style=\"width: 534px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47570\" class=\"size-full wp-image-47570\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6.png\" alt=\"Load Balancing in MongoDB\" width=\"524\" height=\"423\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6.png 524w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6-150x121.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6-300x242.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-6-520x420.png 520w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/a><p id=\"caption-attachment-47570\" class=\"wp-caption-text\">Load Balancing<\/p><\/div>\n<h4>ii. Sharding<\/h4>\n<p>To increase performance, scalability, and handle enormous datasets, MongoDB uses the data splitting technique known as sharding to horizontally spread data over numerous servers or nodes. Each MongoDB shard functions separately to perform read and write operations for its specific data range.<\/p>\n<p>A shard is a distinct database instance that contains a part of the data. Data is divided throughout the sharding process based on a field in the document called a shard key, which is used to pinpoint the position of each shard. The workload may be dynamically distributed as the data increases, adding additional shards as needed to ensure effective data distribution and retrieval throughout the whole database cluster.<\/p>\n<p>The key component of MongoDB&#8217;s design that enables it to manage large datasets and high-throughput applications is sharding.<\/p>\n<div id=\"attachment_47571\" style=\"width: 630px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47571\" class=\"size-full wp-image-47571\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7.png\" alt=\"\" width=\"620\" height=\"440\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7.png 620w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7-150x106.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7-300x213.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-7-520x369.png 520w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><p id=\"caption-attachment-47571\" class=\"wp-caption-text\">Sharding in MongoDB<\/p><\/div>\n<h4>iii. Flexibility<\/h4>\n<p>It does not require data structures, that are unified in nature across all the objects that are being used. This makes it easier to use MongoDB. With the help of dynamic schema, it is very easy to use MongoDB.<\/p>\n<div id=\"attachment_47572\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47572\" class=\"size-full wp-image-47572\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8.png\" alt=\"Flexibility in MongoDB\" width=\"638\" height=\"359\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8.png 638w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8-150x84.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8-300x169.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-8-520x293.png 520w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/a><p id=\"caption-attachment-47572\" class=\"wp-caption-text\">Flexibility<\/p><\/div>\n<h4>iv. Speed<\/h4>\n<p>MongoDB can fast and easy process the data. But this is valid up to your data is in document format. We can say that it\u2019s speed automatically increases as it is handling a large amount of unstructured data within seconds which feels like magic.<\/p>\n<h4>v. Schema-less<\/h4>\n<p>Schema-less data models do not have a specified or strictly enforced data structure. These databases, like MongoDB, allow data to be kept in a flexible and dynamic fashion with each document or record having its own unique collection of fields and data types, in contrast to typical relational databases with preset schemas. It is simpler to repeat and modify the data model during development thanks to this flexibility, which enables developers to manage a variety of changing data without the requirement for a preset structure.<\/p>\n<p>Schema-less data models allow quicker development and simpler scaling, making them particularly suitable for organisations working with unstructured data or those whose data requirements change often.<\/p>\n<p>They do, however, also come with difficulties, such as preserving data integrity without a set schema and more difficult data analysis because of different data formats. The decision to utilise a schema-less data model should ultimately be based on the project&#8217;s particular requirements and the type of data being handled.<\/p>\n<div id=\"attachment_47550\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47550\" class=\"size-full wp-image-47550\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01.jpg\" alt=\"MongoDB Benefits &amp; Limitations\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-Benefits-and-Limitations-01-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-47550\" class=\"wp-caption-text\">MongoDB Advantages and Disadvantages<\/p><\/div>\n<h3>Drawbacks\/Limitations of MongoDB<\/h3>\n<p>This is the<strong> third phase of Why MongoDB<\/strong>, limitations.<\/p>\n<h4>i. Usage of Memory<\/h4>\n<p>As we know that MongoDB stores the key name along with every document so it is obvious that it will consume a large amount of memory. And as joins are also not possible so it becomes very difficult to work with duplicate data.<\/p>\n<div id=\"attachment_47573\" style=\"width: 608px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47573\" class=\"size-full wp-image-47573\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10.png\" alt=\"Usage of Memory in MongoDb\" width=\"598\" height=\"388\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10.png 598w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10-150x97.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10-300x195.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/Why-mongoDB-10-520x337.png 520w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><p id=\"caption-attachment-47573\" class=\"wp-caption-text\">Usage of Memory<\/p><\/div>\n<h4>ii. No Joins<\/h4>\n<p>As we apply joins very easily in the relational database very easily, it is not possible to apply joins in MongoDB. So if you want to apply joins in it, then you will have to write many complex queries to perform join operation over here.<\/p>\n<h4>iii. Still Under Development<\/h4>\n<p><strong>SQL was developed<\/strong> in the 1980s, and <strong>MongoDB<\/strong> just emerged in 2009. So due to this reason, MongoDB is not yet fully documented or tested and does not have total support from the experts of it.<\/p>\n<h3>Summary<\/h3>\n<p>So, after reading it, you can get an idea that why should we use it, what are its advantages and disadvantages.Besides, if you have any query, feel free to ask in the comment section below, we would love to help you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we see in today\u2019s world that most of the people are switching to MongoDB, there are still many who prefer to use a traditional relational database. Here, we will discuss why MongoDB should&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":47549,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[18452,8795,18453,18454,8823,18411,18451],"class_list":["post-47545","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb","tag-mongodb-advantages","tag-mongodb-benefits","tag-mongodb-disadvantages","tag-mongodb-drawbacks","tag-mongodb-features","tag-mongodb-limitations","tag-why-mongodb-learn"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Why MongoDB &#8211; 10 Reasons to Learn MongoDB - DataFlair<\/title>\n<meta name=\"description\" content=\"In this mongoDB tutorial, we will learn Why mongoDB is important, features, advantages, disadvantages, limitations, benefits in IT industry\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/why-mongodb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why MongoDB &#8211; 10 Reasons to Learn MongoDB - DataFlair\" \/>\n<meta property=\"og:description\" content=\"In this mongoDB tutorial, we will learn Why mongoDB is important, features, advantages, disadvantages, limitations, benefits in IT industry\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/why-mongodb\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-15T05:58:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-14T11:27:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB - DataFlair","description":"In this mongoDB tutorial, we will learn Why mongoDB is important, features, advantages, disadvantages, limitations, benefits in IT industry","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/why-mongodb\/","og_locale":"en_US","og_type":"article","og_title":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB - DataFlair","og_description":"In this mongoDB tutorial, we will learn Why mongoDB is important, features, advantages, disadvantages, limitations, benefits in IT industry","og_url":"https:\/\/data-flair.training\/blogs\/why-mongodb\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-01-15T05:58:41+00:00","article_modified_time":"2023-08-14T11:27:39+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB","datePublished":"2019-01-15T05:58:41+00:00","dateModified":"2023-08-14T11:27:39+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/"},"wordCount":1604,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg","keywords":["MongoDB Advantages","MongoDB Benefits","MongoDB Disadvantages","MongoDB drawbacks","MongoDB Features","MongoDB limitations","Why MongoDB Learn"],"articleSection":["MongoDB Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/why-mongodb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/","url":"https:\/\/data-flair.training\/blogs\/why-mongodb\/","name":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg","datePublished":"2019-01-15T05:58:41+00:00","dateModified":"2023-08-14T11:27:39+00:00","description":"In this mongoDB tutorial, we will learn Why mongoDB is important, features, advantages, disadvantages, limitations, benefits in IT industry","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/why-mongodb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/01\/MongoDB-01.jpg","width":1200,"height":628,"caption":"Why MongoDB"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/why-mongodb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"MongoDB Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/mongodb\/"},{"@type":"ListItem","position":3,"name":"Why MongoDB &#8211; 10 Reasons to Learn MongoDB"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/47545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=47545"}],"version-history":[{"count":8,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/47545\/revisions"}],"predecessor-version":[{"id":118022,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/47545\/revisions\/118022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/47549"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=47545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=47545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=47545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}