The advantages of different NoSQL databases

NoSQL databases, an alternative to more traditional relational SQL databases, have been increasing in popularity. While it is not necessarily outright going to replace relational databases, many companies adopt the principle of polyglot persistence, which here refers to the usage of NoSQL databases to augment the relational databases. Here we can look at different NoSQL databases, and the benefits of using them.

  • Document databases (e.g. MongoDB, CouchDB, etc) - 0ften based off of a JSON structure, enhancing it with a binary form called BSON
  1. Schema-less, allowing for a flexible structure which allows for easy adaptability to a range of data

  2. Well suited for vertical scaling through partitioning

  • Key Value Stores (e.g. AWS Redis, Riak, etc) - the most simplest form, there is a key and a corresponding value, similar to a dictionary, although there are more enhanced and sophisticated versions
  1. Simplest type of database and easiest to use, making it very good for use cases where data isnโ€™t highly relational and you do not need to store data with several attributes

  2. However, if your use case is more advanced, there are KVS databases which allow for more advanced value types, for example arrays of JSON

  • Graph database (e.g. Neo4j, AllegroGraph, etc) - database where relations between data points are based off of graphs
  1. Is good for relational data, as there is a description of the relation between data points

  2. Can be used for graph theory purposes

  • Column oriented database (e.g. Apache HBase, Apache Cassandra, etc) - organised by sets of columns
  1. More efficient retrieval of data that you need

  2. As relational databases can have a tendency to repeat quite a bit of data, columnar databases can provide a workaround for this

2 Likes