What is NoSQL Good For?


Where should I use NoSQL database ? Some use cases and examples

NoSQL databases are very popular and many engineers want to pick them for their application. Though NoSQL databases are good for many use cases, they may not always be the best choice.

NoSQL databases are highly scalable and fast, at the same time they also have a large operations overhead that may become a nightmare in long run.

The choice of the database completely depends on your application needs. Millions of applications still use a relational database and work just fine.

In this article, I am going to talk about some use cases and examples where NoSQL databases thrive.


What is a NoSQL Database?

NoSQL database term is widely used for any database that is not a relational database.

For many years, a relational database was a synonym to the database. However, this has changed in the last decade. Many applications are developed using a database that is not relational.

Though some NoSQL databases support SQL like syntax as well, most NoSQL databases commonly do not follow SQL syntax for retrieving data.

The NoSQL databases include many different kinds of databases some of them are

- Key-Value store based database e.g. CouchDB, Couchbase etc.
- Document databases e.g. MongoDB
- Graph databases e.g. Neo4J, Titan

Here is a huge list of open source NoSQL databases available.

What is NoSQL good for?


As a beginner, you may always wonder that what are some use cases where NoSQL database is a suitable choice. Here are some use cases and real-world application examples that can help you apply the knowledge in future.

1. You have seriously big data or have the potential to get it.

Most companies do not have big data, however, if your data set is big you may want to consider NoSQL database solutions.

What data is a big data?

You may want to consider it big data if your data size/flow is going to be in the terabytes range. This is surely a relative term since computational speeds are changing every day. Maybe sometime from now, a terabyte is not even a big data. 

NoSQL databases perform a lot better on big data and easy to scale out. This is a clear advantage over any relational database that can be only scaled up and has limits that become a bottleneck for big data processing.

2. Need To Scale Out Fast - Horizontal Scaling

In case you expect your application it to go popular in a short time - you can easily scale out a NoSQL database by adding more machines to your system.

Are you developing a mobile app for Android or iPhone? You may want to consider NoSQL databases as your backend data store for the following reasons.

Some examples of apps where quick scaling out may be needed.

  • Multiplayer Mobile gaming apps (e.g. Minecraft) 
  • A Handy iOS / Android app that may store data in a server. 
  • Notes app (Sticky notes, Evernote, Google keep etc)
  • Todo list app (Todoist, iOS Reminder, Remember the milk)

3. Need Scale Down Fast

Scaling down may not sound very obvious when you are super excited about your application being popular, however, you may want to be prepared to reduce cost when needed. By scaling down you can reduce your recurring costs and keep the business running when your traffic reduces.

When properly structured, scaling down is also as easy as scaling out. You can easily reduce your servers and shrink your database expense.

4. Fast Response Time

The NoSQL databases have a fast response time that is ideal for every app.

Who does not like fast response time? However, most application do not respond fast enough. Some examples of apps where slow response time is not acceptable.

- Mobile Gaming apps
- Stock ticker
- Ad server

5. Eventual Consistency is Acceptable

You may have an application where data consistency is not a big deal. For example, Twitter stores its status messages in an eventually consistent database. Some examples of apps where eventual consistency may be acceptable.

- Messaging application (e.g. iMessage)
- Remote Logging application (e.g. Splunk)
- Chat application (e.g. WhatsApp)
- Social media messaging. (Twitter, Facebook)
- Blog / Website / Content management system. (Any content website or blog platform )
- Email (Gmail, icloud)
- Ad server (Adsense, buysellads)

6. Some More Applications Where NoSQL Databases are used

Here are some more examples that use NoSQL efficiently.

- Redis is used by Coinbase for rate limiting the Bitcoin transactions.
- Cassandra is used by Spotify for storing user profile information.
- MongoDB is used by the Wheather Channel mobile apps.


Summary

I hope this article is able to help you get a perspective on where NoSQL databases fit well. There are many other use cases where NoSQL stores will be suitable. Please share your thoughts in comments.

Post a Comment Default Comments

...

item