NoSQL 101:Why you should learn it and how it compares to SQL

Mahi!
feedflood
Published in
3 min readSep 22, 2019

First of all, NoSQL doesn’t mean No SQL, which means it is not an alternative to widely used RDBMS querying language SQL. The two systems are different and have different applications.

Now that it is clear here is a brief definition of NoSQL:

NoSQL are the Next Generation Databases which are Non-Relational, Distributed, Horizontally Scalable, Schema free databases which can easily store huge amount of data.

Now let’s try to understand this definition

The NoSQL databases are Non-Relational which means that they do not store data inside a table in the form of rows and columns. Instead of the different NoSQL databases uses different techniques to store data. The most popular way is to store them in a JSON structure in which Key-Value pairs of data are maintained.

NoSQL databases are Distributed which means that they are pretty much immune to a single point of failure. Making them distributed also make them available through different mediums as data is stored in various Datacenters across geographic locations. This behavior also makes them very useful in cloud services.

Horizontally Scalable databases are very economical and maintainable than vertically scalable ones. The in horizontally scalable databases we can add new storage and processors to the existing one with ease whereas in vertical scaling the same database needs to be upgraded to meet the demand which is not so efficient if we don’t plan meticulously at the very start. Also, Horizontally scalable means you can add new infrastructure without affecting the functionality of the existing one and both the infrastructures assimilate very well.

Schema free databases mean that there is no need to plan the structure of the data at the beginning also once done changing the schema afterward can be a real pain in the ass with so many restrictions and rules in a relational database. In a NoSQL database, you can change the structure of your data as you go and it doesn’t even need to be consistent with other documents in the database. This is also referred to as Dynamic Schema.

Finally, The big advantage is that they can store huge amount of data structured or unstructured which makes them really useful for various data warehousing techniques which can store data in any format and then derive useful information for that data.

Due to these features, NoSQL databases are very popular in gaming, web, Social media, IoT and cloud services.

Now that we have a basic knowledge about NoSQL databases let’s agree that NoSQL databases are much more versatile than that of SQL and hence they have a very broad use-case. They are also called the database of the future because of their flexibility and malleability. It can also be considered as an umbrella term for all the databases that are not relational. So comparing them with SQL is more or less not very wise.

Actually SQL is only used for Relational Databases while NoSQL is used for many types of Data model. Here are some core NoSQL systems and popular databases of those models

  • Wide Column Store:(HADOOP/HBASE, Cassandra)
  • Document Store: (MongoDB, CouchDB, Cloud Firestore)
  • Key-Value/Tuple Store: (Redis, DynamoDB, Riak)
  • Graph Database:(Neo4j)

Some complaints about NoSQL databases are that they may create inconsistency as the same data is stored redundantly on more than one place, but on the bright side, it makes a developer experience much smoother.

If you like my work please consider supporting me

Thanks:)

--

--