In Tonight's Epic battle we have SQL vs. NoSQL!

Old faithful vs Young and New

The debate between SQL and NoSQL databases I found to be a quite heated one. Many people have very different opinions on the benefits of either one of them and the usefulness of them. After researching them for a while I found that they are very different database systems that both seem to have their places. SQL databases are tried and true with a very reliable relational algebra and relational calculus mixture. While NoSQL databases are non-relational ones that focus more on key-value pairs. While still relatively new, they are used by some major players in the game like Craigslist, The New York Times and MTV Networks. Though these databases are constructed very differently, they both still serve a very similar purpose, to store mass amounts of information. Here are a few key differences between the two:

SQL Databases

  1. Primarily called as relational databases
  2. Table based databases, consisting of tables and rows
  3. Predefined Schemas definitions that must be adhered to
  4. Vertically scalable, managable by increasing CPU, RAM, SSD on single server
  5. Uses SQL for defining and manipulating objects, is an ISO/IEC standard
  6. Excellent support is available for SQL because it is an older technology
  7. Can switch vendors if you have too because of common relational model in SQL
  8. SQL Databases emphasize on A-C-I-D properties:
  9. Not best fit for heirarchical Data but can through recursive common table expressions
  10. Best fit for heavy-duty transactional applications because of the stability and promise of atomicity

NoSQL Databases

  1. Primarily called as non-relational or distributed databases
  2. Document based databases, key-value pairs, documents, graphs, or wide column stores
  3. Dynamic Schemas for unstructured data
  4. Horizontally scalable, just add a few more servers to handle increased traffic
  5. Queries focus on collections of documents and can vary from database to database
  6. Support for NoSQL can only come from your vendor because there is no common relational model
  7. Cannot change vendors because they are all so different, essentially locked-in
  8. NoSQL Databases follow the Brewers CAP theorem:
  9. Better fit for heirarchical data as they store data in a key-value pair and are highly preferred for storing large data sets

My Opinion

After reading through quite a few different resources on the differences between SQL and NoSQL databases I have very mixed feelings between the two. On the SQL side of things I feel that they are a much more thought out system of storing data that runs off of tried and true techniques. Since they have been around for almost 30 years they are well maintained and if you do have any issues you can easily find help to fix them. Programmers have been working with them for so long and have worked with every issue that it is easy to get help. On the NoSQL side of things I think that they are great in the sense of having dynamic schemas that can be changed and can evolve your data schema without modifying the existing data. NoSQL databases can be faster at times and are a better fit for large data sets. One of the last points on NoSQL databases to be made is that they tend to represent entities in a more natural way. SQL databases have normalization rules that break data in an artificial way in order to avoid redundancy. Because of this SQL databases end up, most of the time, with objects that do not represent the real-world very well, while NoSQL databases do a better job at representing real-world objects. So to sum this up I feel that I personally like the idea of SQL databases because of the support that you can get, the common relational model, the atomicity and promise of stability and consistency of your data. NoSQL databases sound like a great idea in the future but as of right now I feel that they do not have a common rock-solid relational model, lack of support and lack of a common language(like SQL).