HENRY'S BLOG

SQL vs NoSQL

SQL

í
SQL (Structured Query Language pronounced "S-Q-L" or "Sequel") is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS). Introduced in 1970s, the relational model offers a very mathematically-adapt way of structuring, keeping, and using the data. Relations bring the benefits of group-keeping the data as collections whereby data-tables relate all the input by assigning values to attributes.
The RDBMS follows the so called CRUD principle:

  • Create
    - Putting data into tables.
  • Read
    - Query data out of a table.
  • Update
    - Change data already in a table.
  • Delete
    - Remove data from the table.

Almost any SQL operation is based on this principle.
Despite their strict nature of forming and handling data, relational databases can become extremely flexible and offer a lot, granted with a little bit of effort.

NoSQL

ì í
The term "NoSQL" has been introduced by Carlo Strozzi in 1998 to name his open-source relational database. Since his system departs from the pure relational model, he came up with this name that is an acronym for "Not only SQL". The current NoSQL movement started in 2009 when Eric Evans and Johan Oskarsson (Last.fm) organized an event to discuss distributed database systems.
The NoSQL way of structuring the data aims to eliminate the constraints that the relational model brings, hence liberating the means of keeping, querying, and using information. NoSQL databases offer many different types of ways to keep and work with the data for specific use cases efficiently by using an unstructured or structured-on-the-go kind of approach.
In contrast to the SQL standard, there are many implementations of NoSQL approaches with each working very differently and serving a specific need. So NoSQL databases do not have a common way to query the data and each solution provides its own query system.

Comparison

ì í
Additional to the differences in data structuring and querying, there are many more. A few of them are listed here:

  • Reliability:
    When it comes to data reliability and safe guarantee of performed transactions, SQL databases are still more solid.
  • Scaling:
    Both solutions are easy to scale vertically (i.e. by increasing system resources). However, being more modern applications, most NoSQL solutions offer much easier means to scale horizontally (i.e. by creating a cluster of multiple machines).
  • Support:
    Relational database management systems are extremely popular and it is very easy to find support. If an issue arises, it is therefore often much easier to solve than recently-popular NoSQL databases, especially when dealing with complex solutions like MongoDB.
  • Complex data keeping and querying needs:
    By nature, relational databases are the go-to solution for complex querying and data keeping needs. Since NoSQL solutions mostly adress specific usecases, they primarily aim to solve a problem in an approachable way. Efficiency is therefore not the main target of most NoSQL solutions.