{"id":325,"date":"2016-12-14T10:21:59","date_gmt":"2016-12-14T10:21:59","guid":{"rendered":"http:\/\/mansainfotech.com\/blog\/?p=325"},"modified":"2016-12-14T10:21:59","modified_gmt":"2016-12-14T10:21:59","slug":"choosing-or-not-choosing-mysql-vs-mongodb","status":"publish","type":"post","link":"https:\/\/mansainfotech.com\/blog\/choosing-or-not-choosing-mysql-vs-mongodb\/","title":{"rendered":"CHOOSING OR NOT CHOOSING \u2013 MYSQL? VS MONGODB?"},"content":{"rendered":"<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">In terms of IT, today, we all are living in the golden age of data management era. So, choosing the best database solution for yourself is a must.<\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Here I provide my rundown on MySQL vs MongoDB \u2013 concepts, terminologies, feature comparison, and conclusion. <span style=\"color: #cc0000;\">Let&#8217;s get cracking then!<\/span><\/span><\/span><\/p>\n<pre class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>OVERVIEW<\/b><\/span><\/span><\/pre>\n<p class=\"western\" style=\"text-align: justify;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Since the release of MySQL in 1995, it has remained most popular and inexpensive option. But with the burst in volume and variety of data in recent years, Databases such as MongoDB have come into view for addressing the requirements of new applications.<span style=\"color: #cc0000;\"> Now, here comes the comparison between Relational Database (such as Mysql) and Non-relational Database (such as MongoDB).<\/span><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>WHAT IS MYSQL?<\/b><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Developed, distributed, and supported by <span style=\"text-decoration: underline;\">Oracle Corporation<\/span>, MySQL is one of the most popular and open-source RDBMS(relational database management system).<\/span><\/span><\/p>\n<p class=\"western\" style=\"text-align: justify;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">It stores data in the form of tables(containing rows\/tuples), uses structured query language for accessing the database, as well as create an association between separate tables through the use of joins. These relational systems have taken the leadership for years while becoming an obvious choice for the IT professionals. <\/span><\/span><\/p>\n<p class=\"western\" style=\"text-align: justify;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>WHAT IS MONGODB OR NOSQL DATABASE? <\/b><\/span><\/span><\/p>\n<p class=\"western\" style=\"text-align: justify;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Developed by MongoDB Inc., MongoDB is an open-source NoSQL Database. It come into existence when the capacity to handle large relational data stores became the challenge, thereby limiting system scalability.<\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">It stores data in JSON-like documents uses dynamic schemas and provides a cheaper way to build complex distributed systems. <\/span><\/span><\/p>\n<p><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>COMMON CONCEPTS AND TERMINOLOGIES<\/b><\/span><\/span><\/p>\n<p><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">The below table outlines the close analogue of Mysql as well as MongoDB:<\/span><\/span><\/p>\n<table border=\"1px\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">\n<colgroup>\n<col width=\"128*\" \/>\n<col width=\"128*\" \/> <\/colgroup>\n<tbody>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"left\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MySQL<\/span><\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"left\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MongoDB<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Table<\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Collection<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Row <\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Document<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Column<\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Field<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Joins<\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"left\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Embedded documents<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>COMPARING FEATURES OF MYSQL &amp; MONGODB<\/b><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Both databases offer a rich set of features and functionalities.Let&#8217;s discuss them below:<\/span><\/span><\/p>\n<table border=\"1px\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">\n<colgroup>\n<col width=\"108*\" \/>\n<col width=\"75*\" \/>\n<col width=\"72*\" \/> <\/colgroup>\n<tbody>\n<tr valign=\"top\">\n<td style=\"text-align: center;\" width=\"42%\"><\/td>\n<td style=\"text-align: center;\" width=\"29%\">\n<p align=\"center\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MYSQL<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"28%\">\n<p align=\"center\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MONGODB<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"42%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Easy for programmers<\/span><\/span><\/p>\n<\/td>\n<td width=\"29%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">No<\/span><\/span><\/p>\n<\/td>\n<td width=\"28%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Yes<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"42%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Are transactions complex?<\/span><\/span><\/p>\n<\/td>\n<td width=\"29%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Yes<\/span><\/span><\/p>\n<\/td>\n<td width=\"28%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">No<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"42%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Contains rich data model<\/span><\/span><\/p>\n<\/td>\n<td width=\"29%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">No<\/span><\/span><\/p>\n<\/td>\n<td width=\"28%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Yes<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"42%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Dynamic schema<\/span><\/span><\/p>\n<\/td>\n<td width=\"29%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">No<\/span><\/span><\/p>\n<\/td>\n<td width=\"28%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Yes<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td style=\"text-align: center;\" width=\"42%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Query used<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"29%\">\n<p align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">SQL<\/span><\/span><\/p>\n<\/td>\n<td width=\"28%\">\n<p style=\"text-align: center;\" align=\"center\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">JSON<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><i>And much more on the list&#8230;..<\/i><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\"><b>QUERY LANGUAGE \u2013 MYSQL VS MONGODB<\/b><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">Both of them have a rich query language. Let check out:<\/span><\/span><\/p>\n<table border=\"1px\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">\n<colgroup>\n<col width=\"128*\" \/>\n<col width=\"128*\" \/> <\/colgroup>\n<tbody>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"center\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MYSQL<\/span><\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"center\"><span style=\"color: #cc0000;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">MONGODB<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p style=\"text-align: center;\" align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">INSERT INTO users (user_id, age, status)<\/span><\/span><\/p>\n<p style=\"text-align: center;\" align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">VALUES (&#8216;bcd001&#8217;, 45, &#8216;A&#8217;)<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"50%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">db.users.insert({<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">user_id: &#8216;bcd001&#8217;,<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">age: 45,<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">status: &#8216;A&#8217;<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">})<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">SELECT * FROM users<\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">db.users.find()<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"50%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">UPDATE users SET status = &#8216;C&#8217;<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">WHERE age &gt; 25<\/span><\/span><\/p>\n<\/td>\n<td width=\"50%\">\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">db.users.update(<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">{ age: { $gt: 25 } },<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">{ $set: { status: &#8216;C&#8217; } },<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">{ multi: true }<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">)<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"western\"><\/pre>\n<p class=\"western\" style=\"text-align: justify;\"><span style=\"font-family: 'Liberation Mono', monospace;\"><span style=\"font-size: medium;\">So, Here I&#8217;ve discussed the few points of Mysql and Mongodb. Both are easy, convenient and functionality rich. Yet, MongoDB has achieved a greater edge over the other <span style=\"color: #cc0000;\">in terms of Fast &amp; diverse data types, removes ORM(object-relational mapping) layer, it is schemaless and much scalable.<\/span><\/span><\/span><\/p>\n<p class=\"western\"><span style=\"font-size: medium;\"><b><span style=\"font-family: 'Liberation Mono', monospace;\">So, choose the one that meets your requirement and keeps coding. See you again with my next blog. Cheerio:) <\/span><\/b><\/span><\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In terms of IT, today, we all are living in the golden age of data management era. So, choosing the best database solution for yourself is a must. Here I provide my rundown on MySQL vs MongoDB \u2013 concepts, terminologies, feature comparison, and conclusion. Let&#8217;s get cracking then! OVERVIEW Since &hellip; <a href=\"https:\/\/mansainfotech.com\/blog\/choosing-or-not-choosing-mysql-vs-mongodb\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">CHOOSING OR NOT CHOOSING \u2013 MYSQL? VS MONGODB?<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[68,62,69,70,71],"class_list":["post-325","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backend-development","tag-database","tag-florida","tag-mongodb","tag-mysql","tag-orm"],"_links":{"self":[{"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":0,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/media\/334"}],"wp:attachment":[{"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mansainfotech.com\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}