5 thoughts on “The difference between SQL and NoSQL

  1. I don’t think I follow – could you elaborate as to why you think this is an accurate metaphor? It seems to me like the classic Orwellian "Four legs good, two legs bad!" – only now based on poor knowledge of typical SQL use cases and the (also typical) arrogance that drinking the Web 2.0 kool-aid brings.

  2. In SQL (Communisim), you have the power to do stuff, but only what the <br/>language (communist party) allows you to do. In NoSQL, you can do <br/>anything you want (especially in document-oriented databases) as you <br/>are the dictator of the country. It’s up to you (your schema design) <br/>how you will rule the country – it can either prosper or be poor and <br/>suffer. <br/> <br/>I’m not disregarding SQL nor am I preaching in favor of NoSQL. Both <br/>techniques have their place and should be used as intended. However I <br/>do most of my programming for the web and my opinion is that NoSQL is <br/>better suited for web programming than SQL. We use SQL because of <br/>historical reasons.

  3. The intention of the metaphor is clear now, thanks for that. Now I can say that the metaphor is wrong, IMHO. :-)What we do with databases is that we put data in and then query them to get the data back in some form. How the databases represent the data and how the queries look, that is up to the database. From the point of the user, it’s all the same.Key-value is as much a schema as tables are in RDBMS. Map reduce is as much querying as SQL is. They are different implementations of the same concept – and for exactly that reason the metaphor doesn’t stand.Yes, there are use cases where NoSQL can be helpful. I’m not saying there aren’t. My point is much simpler – don’t compare SQL and NoSQL on these terms, because you may find that they are much more alike than not.

  4. The metaphor stands. You write "they are different implementations of <br/>the same concept" and that’s correct. The concept is data storage (or <br/>ruling a country in the metaphor) and the implementations are SQL and <br/>NoSQL (communism and dictatorship). <br/> <br/>Yes, it’s up to the database how it stores data and execute queries. <br/>But from the user’s (developer’s) point of view, both systems are very <br/>different. When using a non-relational DB engine, it’s up to the <br/>developer, his knowledge and system design how the model will look <br/>like (this is true mostly for document-oriented DBs; with pure <br/>key-value stores, there’s not much one can do). On the other hand, <br/>when using a relational database, you have to define relationships <br/>between entities according to a relational algebra, you have to <br/>normalize your data. Well, you don’t *have* to, you may denormalize to <br/>achieve better performance like the Friendfeed guys did, but what’s <br/>the point of using an RDBMS then? Non-relational database engines are <br/>designed to do this stuff. You, the dictator, can command them (your <br/>country) any way you want.

  5. Well then I guess I’m just to JEE to see it. 🙂 If I were formulating such a metaphor, I’d say that RDBMS is a universe where the conventional laws of physics hold, while NoSQL is a universe where just about anything is possible.I prefer to live in the first universe, because anywhere within there are many things you can take for granted. In fact, if everyone who abuses the RDBMS "laws of physics" left for the NoSQL universe right now, RDBMS universe would become a much happier and simpler place. 🙂

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s