A NoSQL database provides a mechanism for storage and retrieval of data that uses looser consistency models than the traditional relational databases. NoSQL databases are normally highly optimized for retrieval and appending operations and most of these offer little functionality beyond record storage.
In the present day NoSQL is very popular mainly because of Cloud Computing and need to handle huge data. Also NoSQL is increasingly being preferred over relational databases because of its schema-less data model and distributed architecture.
The current NoSQL world fits into four categories which are mentioned below:
- Key-values Stores
- Document databases
- Graph databases
- Column Family Stores
We have listed down some of the scenarios wherein you should or shouldn’t use this feature for developing any application.
Scenarios where NoSQL should be used:
- Your relational database will not scale to your traffic at an acceptable cost as your NoSQL database.
- Your data is supplied in small updates spread over time due to which the number of tables required to maintain a normal form has grown disproportionally to the data being held.
- In a NoSQL database, there is no fixed schema and no joins. NoSQL can take advantage of “scaling out”. Scaling out refers to spreading the load over many commodity systems. This is the component of NoSQL which makes it an inexpensive solution for large datasets.
- It’s useful for creating prototypes or fast applications as it provides a tool to develop new features easily.
- You have local data transactions which do not have to be very durable. e.g. “liking” items on websites.
Scenarios where NoSQL should be avoided:
- Avoid using NoSQL databases when your application requires run-time flexibility.
- It cannot necessarily guarantee the ACID(Atomicity,Consistancy,Isolation,Durability) properties for your transactions. So financial transactions requiring these properties can be avoided.
- Normally an interface is provided for storing your data. Do not try to use a complicated query in that interface. Contact your service provider if the need arises.
- The developer should always keep in mind that NoSQL database is not built on tables and usually doesn’t use structured query language.
- If consistency is mandatory and there will be no drastic changes in terms of the data volume then relational databases would be a better option as compared to NoSQL databases.
Major NoSQL Players