/  Technology   /  5 Popular NoSQL Databases for Every Data Science Professional

5 Popular NoSQL Databases for Every Data Science Professional

The incontrovertible truth is that we are generating data at an unprecedented pace and scale right now. The sheer fact that more than 8,500 Tweets and 900 photos on Instagram are uploaded in just one second blows my mind. It boggles the mind – how are modern-day databases coping up with such volumes of data?

To handle this huge amount of data, we need a distributed database system that can run multiple nodes and are partition tolerant as well. It means even if one of the nodes goes down for any reason, the system should work seamlessly.

In this article, we will see different types of NoSQL databases, their features, and when to use each database type.

 

What is a NoSQL Database?

 

The acronym “NoSQL” has two interpretations which are not clear-cut today:

  • For some it is No SQL, that is to say, the use of another query language different from SQL.
  • For the others, it is Not Only SQL, but that is also to say, the combined use of SQL with other information retrieval tools.

 

When you work with a huge amount of data, you don’t need to worry about the performance lags when you query a NoSQL database. No need to run the expensive joins! They are highly scalable and reliable and designed to work in a distributed environment.

 

Types of NoSQL Databases

 

NoSQL is to reduce the complexity of the query language and to simplify the architecture of the database. These databases consist of column-oriented, document-oriented, graph-oriented and key / value-oriented data. The NoSQL family is made up of various products, each product has a unique set of functionalities.

Now that we know what a NoSQL database is, let’s explore the different types of NoSQL databases in this section.

 

1. Document-Based NoSQL Databases

 

Document-based databases store the data in JSON objects. Each document has key-value pairs like structures. It is taken from JavaScript and contains objects, strings, numbers, arrays, booleans, and null in a nested dictionary.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

They are very flexible and allow us to modify the structure at any time.Some examples of document-based databases are MongoDB, Orient DB, and BaseX.

 

2. Key-Value Databases

 

As the name suggests, it stores the data as key-value pairs. Here, keys and values can be anything like strings, integers, or even complex objects.Key-value databases are generally easier to run in a distributed fashion.Queries and updates usually very fast.Any type of data in any structure can be stored as a value.They can be really useful in session-oriented applications where we try to capture the behavior of the customer in a particular session.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

Some of the examples are DynamoDB, Redis, and Aerospike.

 

3. Wide Column-Based Databases

 

This database stores the data in records similar to any relational database but it has the ability to store very large numbers of dynamic columns. It groups the columns logically into column families.

For example, in a relational database, you have multiple tables but in a wide-column based database, instead of having multiple tables, we have multiple column families.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

Popular examples of these types of databases are Cassandra and HBase.

 

4. Graph-Based Databases

 

They store the data in the form of nodes and edges. The node part of the database stores information about the main entities like people, places, products, etc., and the edges part stores the relationships between them. These work best when you need to find out the relationship or pattern among your data points like a social network, recommendation engines, etc.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

Some of the examples are Neo4j, Amazon Neptune, etc.

 

List of the Different NoSQL Databases

 

1) MongoDB

 

MongoDB is a flexible/reliable database that will draw you to the NoSQL world. Its management and maintenance are very easy and fast.It stores the documents in JSON objects.

 

When to use MongoDB?

The document-based model of MongoDB will be a great fit, when you are planning to integrate hundreds of different data sources.

 

2) Cassandra

 

Cassandra is an open-source, distributed database system that was initially built by Facebook (and motivated by Google’s Big Table). It is widely available and quite scalable. It can handle petabytes of information and thousands of concurrent requests per second.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

When to use Cassandra?

  • When you require a smaller number of joins and aggregations in your queries to the database.
  • When use case requires more writing operations than reading ones.
  • You can use it for social network websites but cannot use it for banking purposes.

 

3) ElasticSearch

 

This is also an open-source, distributed NoSQL database system. It is highly scalable and consistent. You can also call it as an Analytics Engine. It can easily analyze, store, and search huge volumes of data.

If the full-text search is a part of your use case, ElasticSearch will be the best fit for your tech stack. It even allows search with fuzzy matching.

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

When to use ElasticSearch?

  • ElasticSearch is useful in storing logs data and analyzing it.
  • If your use case requires a full-text search, Elasticsearch will be the best fit.
  • Your use case involves chatbots where these bots resolve most of the queries.

 

4) Amazon DynamoDB

 

It is a key-value pair based distributed database system created by Amazon and is highly scalable. But unfortunately, it is not open-source. It can easily handle 10 trillion requests per day so you can see why!

 

5 Popular NoSQL Databases forEvery Data Science Professional

When to use DynamoDB?

  • Can be used in database that can handle simple key-value queries but those queries are very large in number.
  • Can use in online ticket booking or banking where the data needs to be highly consistent.

 

5) HBase

 

It is a column-oriented database that helps improve the query performance and aggregations. HBase was written in JAVA and runs on top of the Hadoop Distributed File System (HDFS).

 

5 Popular NoSQL Databases forEvery Data Science Professional

 

When to use HBase?

  • You should have at least petabytes of data to be processed.
  • Your use case requires random and real-time access to the data, then HBase will be the appropriate option.

 

This is by no means a comprehensive list. There are more NoSQL databases out there but these are the most widely used in the industry.

 

 

 

 

 

 

 

 

Leave a comment