{"id":166457,"date":"2023-02-10T11:40:53","date_gmt":"2023-02-10T10:40:53","guid":{"rendered":"https:\/\/liora.io\/en\/?p=166457"},"modified":"2026-02-17T09:26:01","modified_gmt":"2026-02-17T08:26:01","slug":"sql-vs-nosql","status":"publish","type":"post","link":"https:\/\/liora.io\/en\/sql-vs-nosql","title":{"rendered":"SQL vs NoSQL: differences, uses, advantages and disadvantages"},"content":{"rendered":"\n<p><strong>Data Analysts, Data Scientists and Data Engineers require Data, making database management a fundamental aspect of their work. A <a href=\"https:\/\/liora.io\/en\/database-management-system-dbms-definition\">DataBase Management System (DBMS)<\/a> is software that allows one or more users to access a database. <\/strong><\/p>\n\n\n\n<p>It controls access (identification, security) and process requests for data ingestion, modification, retrieval, or deletion. There are <b>two main families<\/b> of DBMS: SQL DBMS and NoSQL DBMS.\u00a0To determine which one is the best technology, we will examine these two and compare their differences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-an-sql-database\">What is an SQL database?<\/h2>\n\n\n\n<p>SQL databases (<b>Structured Query Language<\/b>) are also called relational databases. They consist of a <b>set of tables<\/b> in which the data are classified by category.<\/p>\n\n\n\n<p>Each column of these tables corresponds to one of these categories and contains a certain number of data from this category. These tables generally have a <b>fixed schema<\/b>, i.e. the form of the tables is defined (number of columns, titles, data type, and possibly other constraints).&nbsp;<\/p>\n\n\n\n<p>Here is an example:<\/p>\n\n\n\n<figure class=\"wp-block-image\" style=\"margin-top:var(--wp--preset--spacing--columns);margin-bottom:var(--wp--preset--spacing--columns)\"><img decoding=\"async\" src=\"https:\/\/liora.io\/app\/uploads\/sites\/9\/2023\/01\/nosql_vs_sql-1024x558.jpg\" alt=\"nosql_vs_sql\" \/><\/figure>\n\n\n\n<p>We can see that each column corresponds to a specific category and that the columns have a well-defined type (ID User, first name &#8230;). These relational databases have been used since their <b>creation by IBM in the 70&#8217;s<\/b> and are the most common, well-known, and, to some extent, the easiest to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-a-nosql-database\">What is a NoSQL database?<\/h2>\n\n\n\n<p>NoSQL databases are, as the name implies, the <b>opposite of SQL<\/b>, i.e. they are <b>non-relational<\/b>. These databases do not require a fixed schema and are easily scalable.&nbsp;Several types can be adapted to multiple data formats, for example, documents, graphs, or even formats with keys. The goal is to be able to <b>retrieve data<\/b> from the same place without having to go through relationships between tables.<\/p>\n\n\n\n<p>Let&#8217;s go back to the previous example with a document format, most often it is a <b>JSON<\/b> object that is used (document type). In this case, each of the SQL column attributes is a field and the details of a person&#8217;s record would be the data values associated with each field:<\/p>\n\n\n\n<p><b>User ID<\/b>: &#8220;<i>452<\/i>&#8221; , <b>First Name<\/b>: &#8220;<i>Laure<\/i>&#8220;, <b>Name<\/b>: &#8220;<i>Moulin<\/i>&#8220;,<b> City_of_residence<\/b>: &#8220;<i>Toulouse<\/i>&#8221; , <b>Department<\/b>: &#8220;<i>Haute-Garonne<\/i>&#8221; , <b>Region<\/b>: &#8220;<i>Occitanie<\/i>&#8220;<\/p>\n\n\n\n<p>Each type of NoSQL database is <b>designed according to a specific situation<\/b> and the respective technical constraints justify a particular structure. NoSQL databases were developed at the end of the 2000s and<b> quickly became popular<\/b> thanks to their ability to manage large distributed Big Data databases.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/en\/courses\/data-ai\/\">Become an expert with databases<\/a><\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"table-of-differences-between-sql-and-nosql\">Table of differences between SQL and NoSQL<\/h2>\n\n\n\n<div>\n  <table style=\"width:100%;border-collapse: collapse;border: 1px solid #ddd\">\n    <thead>\n      <tr style=\"background-color: #ff6745;color: #ffffff\">\n        <th style=\"border: 1px solid #ddd;padding: 8px\"><\/th>\n        <th style=\"border: 1px solid #ddd;padding: 8px\">SQL<\/th>\n        <th style=\"border: 1px solid #ddd;padding: 8px\">NoSQL<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody>\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Definition<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Relational<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Non-relational or distributed<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Application<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Query to analyze and recover data<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Suitable for a variety of modern application technologies such as WebApp<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Query Language<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">SQL<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Several languages<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Type<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Table<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Document \/ Charts \/ Key-Values<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Schema<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Fixed and pre-defined<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Dynamic<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Data Management System (DMS) examples<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Oracle, PostGres, MySql<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">MongoDB, Neo4J<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Adapted for<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Intensive and complex requests<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Large database, Big Data<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Creation<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">1970&#8217;s<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">2000&#8217;s<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Open Source<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Open source (PostGres, MySql) and commercial (Oracle) mix<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Open source majority<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Benefits<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Optimized storage and stability<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Easy and flexible storage<\/td>\n      <\/tr>\n\n      <tr>\n        <td style=\"border: 1px solid #ddd;padding: 8px\"><strong>Disadvantages<\/strong><\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Rigidity and the need for expertise<\/td>\n        <td style=\"border: 1px solid #ddd;padding: 8px\">Sometimes overly permissive<\/td>\n      <\/tr>\n    <\/tbody>\n  <\/table>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sql-and-nosql-which-technology-to-choose\">SQL and NoSQL: which technology to choose?<\/h2>\n\n\n\n<p>Both technologies have the same objective, which is to store data, but do it in very different ways as we have seen. We will now see how to know which one to choose for your projects.<\/p>\n\n\n\n<p class=\"is-style-h3\">Choose SQL :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Need<b> structured and segmented database<\/b> (the basis of relational databases)<\/li>\n\n\n\n<li>Type and validity of data are very important<\/li>\n\n\n\n<li>Recurring need to <b>write and modify data on specific elements<\/b> (SQL allows you to easily modify specific rows)<\/li>\n\n\n\n<li>Need complex queries<\/li>\n<\/ul>\n\n\n\n<p class=\"is-style-h3\">Choose NoSql :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database without specific schema (A non fixed structure for example)<\/li>\n\n\n\n<li>Need for many read queries, all the <b>necessary data can be retrieved<\/b> at once without any particular join<\/li>\n\n\n\n<li>Large data sets (<b>Big Data<\/b>)<\/li>\n\n\n\n<li>Distributed data (several sources)<\/li>\n<\/ul>\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>SQL and NoSQL are two DBMS that have the same purpose: <b>Store data<\/b> and to offer <b>tools to read and manipulate these data<\/b>.&nbsp;<\/p>\n\n\n\n<p>Choosing the most suitable database is very important because the DataBase is the basis of work of all data professions. However, this task is <b>not easy<\/b> and the answer is <b>not always obvious<\/b> even for experts. Today we have seen that the first step is to choose between a <b>relational database <\/b>(SQL) or a <b>non-relational database<\/b> (NoSQL). The next step will be to choose which SQL or NoSQL option to choose (Oracle, Postgres, <strong><a href=\"https:\/\/liora.io\/en\/mongodb-all-about-the-document-oriented-nosql-database\">MongoDB<\/a><\/strong> &#8230;)<\/p>\n\n\n\n<p>If you want to know more about these technologies and what they allow you to do, don&#8217;t hesitate to <strong><a href=\"\/en\/appointment\">take an appointment<\/a><\/strong> with us and discuss about the best training according to your needs<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex is-content-justification-center\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/en\/courses\/data-ai\/\">Know more about Liora&#8217;s courses<\/a><\/div>\n<\/div>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What is an SQL database?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"SQL databases (Structured Query Language) are also called relational databases, consisting of a set of tables in which the data are classified by category.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"What is a NoSQL database?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"NoSQL databases are, as the name implies, the opposite of SQL, i.e. they are non-relational and do not require a fixed schema, and are easily scalable.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Table of differences between SQL and NoSQL\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"The article presents a comparison table outlining how SQL and NoSQL differ in definition, application, query language, type, schema, and other attributes.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"SQL and NoSQL: which technology to choose?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Both technologies have the same objective, which is to store data, but they do it in very different ways, and the article explains how to know which one to choose for your projects.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Conclusion\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"SQL and NoSQL are two DBMS that have the same purpose\u2014to store data and offer tools to read and manipulate these data, but choosing the most suitable database is important.\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Data Analysts, Data Scientists and Data Engineers require Data, making database management a fundamental aspect of their work. A DataBase Management System (DBMS) is software that allows one or more users to access a database. It controls access (identification, security) and process requests for data ingestion, modification, retrieval, or deletion. There are two main families [&hellip;]<\/p>\n","protected":false},"author":50,"featured_media":96698,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"editor_notices":[],"footnotes":""},"categories":[2433],"class_list":["post-166457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai"],"acf":[],"_links":{"self":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/166457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/comments?post=166457"}],"version-history":[{"count":5,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/166457\/revisions"}],"predecessor-version":[{"id":206982,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/posts\/166457\/revisions\/206982"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media\/96698"}],"wp:attachment":[{"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/media?parent=166457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liora.io\/en\/wp-json\/wp\/v2\/categories?post=166457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}