TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SQL vs. NoSQL Databases: What’s the Difference?

44 pointsby rockdieselabout 9 years ago

16 comments

gjolundabout 9 years ago
I have issues with his &quot;Reasons to use NoSQL&quot;<p>* Making the most of cloud computing and storage<p>There are plenty of &quot;cloud&quot; hosting options for SQL databases, enough that a simple google search should make my point for me.<p>* Rapid development<p>This is a really common reason that I have heard for wanting to use NoSQL databases. It is flat out wrong.<p>While NoSQL databases may not force you into a schema for your database, you will pay a toll for this mutability in your application layer.<p>I have worked on several NoSQL backed projects, and nearly without fail development speed drops like a rock once you make changes to the way your data is persisted.<p>SQL migrations may seem tedious, but the process of planning your data model and having rigid definitions for your data types saves you huge amounts of time in the long run.<p>Data is the foundation of most applications, and if you can&#x27;t rely on your data then you are building your application on sand.
评论 #11684797 未加载
评论 #11684608 未加载
评论 #11684711 未加载
评论 #11684727 未加载
评论 #11684676 未加载
评论 #11684953 未加载
manigandhamabout 9 years ago
Why is this even on HN? There&#x27;s no reason to debate this, it&#x27;s a content marketing fluff piece for a company that has no technical pedigree, written by a freelance copywriter rather than an engineer.<p>It&#x27;s also about 50% wrong. Let&#x27;s just move on.
评论 #11685132 未加载
callesggabout 9 years ago
The article read like it is written by someone who has never understood how to use a SQL database.<p>To quote Mr Torvalds himself:<p>&quot;Bad programmers worry about the code. Good programmers worry about data structures and their relationships.&quot;<p>Something that i struggled with before i learned how to use a SQL&#x2F;relational database was to actualy use the database relations in my code. I first specified the relations in the database then i basicly redid them in the code.<p>The way i tend to program these days is to have basically all my relations restrictions and relational rules in the database. Whenever i want to change something you just alter stuff in the database GUI. Most of the application code will just follow along.
评论 #11684972 未加载
评论 #11684945 未加载
评论 #11691751 未加载
hobsabout 9 years ago
Chuckling at: Your data is structured and unchanging. If your business is not experiencing massive growth that would require more servers and you’re only working with data that’s consistent, then there may be no reason to use a system designed to support a variety of data types and high traffic volume.<p>SQL Databases support a variety of data types and high traffic volume, they just dont allow you to change things without thinking a little more deeply on the problem.<p>This article is just fluff.
hardwaresoftonabout 9 years ago
Postgres is the last SQL DB thing mentioned?<p>No mention of RethinkDB (<a href="https:&#x2F;&#x2F;rethinkdb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rethinkdb.com&#x2F;</a>) ?<p>SQL is good if your data is &quot;unchanging&quot;? Schema migrations happen, SQL can be sharded and scaled to multiple servers, and the fact is, unless you&#x27;re facebook or google, you probably won&#x27;t even need it. Didn&#x27;t reddit run postgres since it began?<p>Glad I skimmed this.
评论 #11684610 未加载
ktamuraabout 9 years ago
I personally think SQL v. NoSQL is less useful of the two dichotomies, the other one being OLTP v. OLAP. In the end, SQL is just an API. You can put SQL-like interface on NoSQL as well (like SlamData for MongoDB or Crate for Elasticsearch).<p>On the other hand, OLTP v. OLAP (transactional v. analytic) is directly tied to use cases and has more profound consequences as far as technical decisions go (data structures, algorithms, etc.)
评论 #11685473 未加载
nthackerabout 9 years ago
This talk by Martin Fowler is a fantastic overview into the SQL vs NoSQL discussion : <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qI_g07C_Q5I" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qI_g07C_Q5I</a>
jcywabout 9 years ago
There should be mentions about CAP theorem, and tradeoffs about consistency vs availability. Sometimes you dont care as much about CAP-consistency than availability or scalability.
lowbloodsugarabout 9 years ago
For me, the most important difference is that a SQL &quot;Database&quot; is actually an incredibly powerful application server, with a built in compiler for a data processing language, and many years of development on access strategies, whereas a NoSQL database is just a level above an http server with an index that scales really well. That&#x27;s a bit of an exaggeration, but I find it helps new teams understand the big picture. In a microservice environment, I encourage my teams to think of their SQL database server as a microservice, not a persistence store.
0x434D53about 9 years ago
That happens, when a content marketer write about a technical topic... Just sad.
BinaryIdiotabout 9 years ago
Many databases considered NoSQL actually have SQL now. Cassandra for instance. Granted it&#x27;s not as critical to the execution as SQL is for RDMS but I would much prefer the distinction to be: RDMS &#x2F; Relational versus KeyValue &#x2F; Document Stores. But I digress.<p>Some of the other criticisms in this thread are very valid especially in the area of why you should use one versus the other so I won&#x27;t bother regurgitate them I just felt like a better distinction could have been used between what they were comparing.
Florin_Andreiabout 9 years ago
&gt; <i>NoSQL data doesn’t need to be prepped ahead of time.</i><p>Unless you&#x27;re using CouchDB and you need to change some views, and then you have to re-index the whole thing, which can take forever.
aristusabout 9 years ago
Bah. People keep confusing the syntax with the data model. SQL is simply a notation to express theorems in relational set theory. It&#x27;s pretty much the only pure-functional, side-effect-free programming language that&#x27;s actually gone mainstream [0]. If you look carefully at the APIs of the &quot;No SQL&quot; databases, you&#x27;ll find them introducing relational set theoretic features.<p>To paraphrase Paul Graham&#x27;s unbearably smug comment about Lisp: once you add filter, group by, and join, you can no longer claim to have invented a new query language, just another dialect of SQL. Math has this funny habit of remaining true no matter how many mean things people say about it on their blogs.<p>[0] I mean basic core SQL, not the vendor-specific stuff like PL&#x2F;SQL.
评论 #11685131 未加载
评论 #11685010 未加载
评论 #11684931 未加载
评论 #11685482 未加载
yamadapcabout 9 years ago
SQL...?
评论 #11684647 未加载
Mister_Snugglesabout 9 years ago
I&#x27;m always saddened when I don&#x27;t see MultiValue[0] databases in the list, but the reality is that there&#x27;s almost nothing that&#x27;s open source in this space.<p>My first real job was doing development on a custom application built entirely in UniVerse[1]. It was a really interesting way to work and mirrors a lot of what the Open Source NoSQL databases do, though it does it differently. Instead of storing the schema with the records (e.g., a JSON document), a record was simply a list of data elements (fields), each field could have multiple values (or not), each value could have multiple subvalues (or not), and there was a lower level that you could go to in order to store multi-line text data.<p>There was a dictionary attached to each file that primarily drove the query tool. You could also build calculated fields (I-descriptors) to do primitive joins, among other things. If you had a file containing invoices, you might have two fields to list the item number and quantity (these would be repeated for as many items as are on the invoice). You could then use an I-descriptor to follow item number over to the items file and pull the description, price, etc.<p>The entirety of the application ran within UniVerse. When users logged in to the unix server, their shell would run a script that would set up the environment and fire up UniVerse. The UniVerse LOGIN paragraph would then show a menu system and allow them to do their thing. Everything was written as either a paragraph, roughly equivalent to a shell script that ran UniVerse commands, or a BASIC program. The dialect of BASIC natively understood dynamic arrays, which were a 1:1 match to the structure of the records on disk.<p>UniVerse also had a built-in way to execute SQL queries against the multivalued data. In the invoice example above, the item number and quantity would be associated in the dictionary. These would then be exposed as another table by the SQL engine. You could go &quot;SELECT A.INVOICENO, B.ITEMID, C.DESCRIPTION, B.QTY FROM INVOICES A, INVOICES_ITEMS B, ITEMS C WHERE A.@ID = B.@ID and B.ITEMID = C.ITEMID&quot; and it would know that INVOICES_ITEMS is really part of the data in INVOICES.<p>It was a really cool system and I wish there was something like it in the Open Source world. Sadly, development on MaVerick[2] seems to have stalled.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MultiValue" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MultiValue</a><p>[1] <a href="http:&#x2F;&#x2F;www.rocketsoftware.com&#x2F;products&#x2F;rocket-universe" rel="nofollow">http:&#x2F;&#x2F;www.rocketsoftware.com&#x2F;products&#x2F;rocket-universe</a><p>[2] <a href="http:&#x2F;&#x2F;www.maverick-dbms.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.maverick-dbms.org&#x2F;</a>
neo2001about 9 years ago
<i>Grabs popcorn</i>