Relational Databases vs NoSQL

Nayanava De
3 min readJul 4, 2020

--

This discussion here is to give an eagle’s eye view of the difference between Relational and NoSQL Databases.

SQL is more to do with a query language more than it has to do with any specific database.

Relational Databases were designed during the 90’s for systems that would only have to scale up to larger disks, RAM’s and faster CPU’s.

But this tapered off and at the end of the day we could only build so big a machine and then the only way forward was to scale out.

Relational Databases are absolutely fine to work with even today if it can suffice our needs from a scale perspective or where we can scale our application servers over the database but the database itself is much harder to scale out.

NoSQL is just a buzz word and it doesn’t actually refer to any particular technology — it was originally intended simply as a catchy Twitter hashtag for a meetup on open source, distributed, nonrelational databases in 2009

Cassandra DB, Mongo DB, Azure Cosmos DB, Amazon DynamoDB, Apache HBase, Arrango DB etc. are some of the different types of NoSQL DB’s.

The common problem that these Databases try to address is handling Big Data which is represented by 3 V’s

  1. Volume: In the 90’s Petabytes of data seemed to be a distant dream but by the mid 2000’s organizations were already handling this volume of data. When we need to handle planetary scale we need to embrace NoSQL.
  2. Variety: More and more heterogeneous data sources in all different shapes and sizes, an coping with schema against all these data sources is an impedance to scale
  3. Velocity: Data is coming in fast and furious and it’s not just memory but throughput where we need low latency, high availability, consistency and all of these things.

Some of the important features of NoSQL databases are

  1. Distributed: NoSQL databases are built to be distributed from the ground-up. The databases are distributed by maintaining replicas of the data, the more copies of the data the higher read throughput we can support which is a way to ensure High Availability and Low Latency.
  2. Scale-Out: NoSQL databases support horizontal partitioning(sharding) which not only ensures limitless memory but also guarantees higher throughput.
  3. Schema-on-read: There is NO predefined schema which needs to be followed while inserting an item into the database which means, no burden of schema changes, unlike in relational databases where its difficult to manage schema changes and also often need the database to be taken offline to perform the same. There is also no headache of replicating the schema changes across multiple instances within a single data center or even those that are Geo-replicated without having to take a downtime.

--

--

Nayanava De

Software Engineer II at Microsoft working on highly scalable distributed systems