{"id":24803,"date":"2015-10-03T16:26:54","date_gmt":"2015-10-03T14:26:54","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=24803"},"modified":"2015-10-03T16:28:19","modified_gmt":"2015-10-03T14:28:19","slug":"sql-vs-nosql-how-to-choose","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2015\/10\/03\/sql-vs-nosql-how-to-choose\/","title":{"rendered":"SQL vs NoSQL: How to Choose"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;<a href=\"http:\/\/www.sitepoint.com\/sql-vs-nosql-choose\/\">SQL vs NoSQL: How to Choose<\/a>&#8221; article continues the discussion of SQL vs. NoSQL from the &#8220;<a href=\"http:\/\/www.sitepoint.com\/sql-vs-nosql-differences\/\">SQL vs NoSQL: The Differences<\/a>&#8221; article. \u00a0Both should be read in full. \u00a0But I&#8217;ll keep the summary here for future use.<\/p>\n<p><!--more--><\/p>\n<blockquote><p><strong>SQL databases:<\/strong><\/p>\n<ul>\n<li>store related data in tables<\/li>\n<li>require a schema which defines tables prior to use<\/li>\n<li>encourage normalization to reduce data redundancy<\/li>\n<li>support table JOINs to retrieve related data from multiple tables in a single command<\/li>\n<li>implement data integrity rules<\/li>\n<li>provide transactions to guarantee two or more updates succeed or fail as an atomic unit<\/li>\n<li>can be scaled (with some effort)<\/li>\n<li>use a powerful declarative language for querying<\/li>\n<li>offer plenty of support, expertise and tools.<\/li>\n<\/ul>\n<p><strong>NoSQL databases:<\/strong><\/p>\n<ul>\n<li>store related data in JSON-like, name-value documents<\/li>\n<li>can store data without specifying a schema<\/li>\n<li>must usually be denormalized so information about an item is contained in a single document<\/li>\n<li>should not require JOINs (presuming denormalized documents are used)<\/li>\n<li>permit any data to be saved anywhere at anytime without verification<\/li>\n<li>guarantee updates to a single document \u2014 but not multiple documents<\/li>\n<li>provide excellent performance and scalability<\/li>\n<li>use JSON data objects for querying<\/li>\n<li>are a newer, exciting technology.<\/li>\n<\/ul>\n<p>SQL databases are ideal for projects where requirements can be determined and robust data integrity is essential. NoSQL databases are ideal for unrelated, indeterminate or evolving data requirements where speed and scalability are more important. In simpler terms:<\/p>\n<ul>\n<li><strong>SQL is digital.<\/strong> It works best for clearly defined, discrete items with exact specifications. Typical use cases are online stores and banking systems.<\/li>\n<li><strong>NoSQL is analog.<\/strong> It works best for organic data with fluid requirements. Typical use cases are social networks, customer management and web analytics systems.<\/li>\n<\/ul>\n<p>Few projects will be an exact fit.<\/p><\/blockquote>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;SQL vs NoSQL: How to Choose&#8221; article continues the discussion of SQL vs. NoSQL from the &#8220;SQL vs NoSQL: The Differences&#8221; article. \u00a0Both should be read in full. \u00a0But I&#8217;ll keep the summary here for future use.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"SQL vs NoSQL: How to Choose #databases #sql #nosql","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,62],"tags":[1559,773],"keyring_services":[],"class_list":["post-24803","post","type-post","status-publish","format-standard","hentry","category-general","category-technology","tag-databases","tag-sql"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27949,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/09\/06\/grakn-and-graql-a-database-for-ai\/","url_meta":{"origin":24803,"position":0},"title":"Grakn and Graql &#8211; a database for AI","author":"Leonid Mamchenkov","date":"September 6, 2017","format":false,"excerpt":"From the grakn.ai website: Grakn\u00a0is a distributed\u00a0hyper-relational\u00a0database for knowledge-oriented systems. Grakn enables machines to manage complex data that serves as a knowledge base for cognitive\/AI systems. Graql\u00a0is Grakn's reasoning (through OLTP) and analytics (through OLAP) query language. Graql is a much higher level abstraction over traditional query language - SQL,\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":40825,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/03\/29\/searching-dynamodb-an-indexer-sidecar-for-elasticsearch\/","url_meta":{"origin":24803,"position":1},"title":"Searching DynamoDB: An indexer sidecar for Elasticsearch","author":"Leonid Mamchenkov","date":"March 29, 2019","format":false,"excerpt":"One thing that I like about the modern world is that large technology companies are a lot more open than they were in the previous century. Many of them contribute to the Open Source ecosystem and frequently share their wisdom on how to use and not to use a particular\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/03\/simpson.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":16856,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/10\/21\/nosql\/","url_meta":{"origin":24803,"position":2},"title":"NoSQL","author":"Leonid Mamchenkov","date":"October 21, 2012","format":"image","excerpt":"Via Geek and Poke.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/10\/nosql.jpg?fit=800%2C1132&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/10\/nosql.jpg?fit=800%2C1132&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/10\/nosql.jpg?fit=800%2C1132&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/10\/nosql.jpg?fit=800%2C1132&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":28347,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/01\/22\/sql-keys-in-depth\/","url_meta":{"origin":24803,"position":3},"title":"SQL Keys in Depth","author":"Leonid Mamchenkov","date":"January 22, 2018","format":false,"excerpt":"SQL Keys in Depth is an excellent read if you want to brush up on your knowledge of database keys and how they affect the performance of your application.\u00a0 For the laziest among you, here are the summary points, based on an extensive research of 60+ articles, StackOverflow questions and\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20288,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/02\/05\/textql-execute-sql-against-structured-text-like-csv-or-tsv\/","url_meta":{"origin":24803,"position":4},"title":"TextQL &#8211; execute SQL against structured text like CSV or TSV","author":"Leonid Mamchenkov","date":"February 5, 2014","format":"link","excerpt":"TextQL - execute SQL against structured text like CSV or TSV","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"textql usage","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2014\/02\/textql_usage-500x375.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":28425,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/03\/09\/sqlbolt-learn-sql-with-simple-interactive-exercises\/","url_meta":{"origin":24803,"position":5},"title":"SQLBolt &#8211; Learn SQL with simple, interactive exercises","author":"Leonid Mamchenkov","date":"March 9, 2018","format":false,"excerpt":"SQLBolt is by far the best SQL tutorial that I've ever seen!\u00a0 Yes, I know, it's a very bold statement.\u00a0 But I promise that it's true. With hundreds of books, videos, and other tutorials around, the problem of delivering the understanding of data management, databases, and SQL to regular people\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/03\/sqlbolt-500x366.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=24803"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24803\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=24803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=24803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=24803"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=24803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}