In order to overcome the limitations of relational databases, more businesses are adopting NoSQL databases. NoSQL databases are designed to support large amounts of data and massive numbers of concurrent requests, making them highly attractive to modern businesses.
There are various NoSQL databases and arguably the only thing they have in common is the fact that they “are not relational”. However, it is possible to categorize them based on the functionality they provide: key/value stores, document databases, column-family databases, and graph databases. While some NoSQL databases fit into a single category, others include functionality from various categories. Let’s look at each of the categories in detail.
These are one of the simplest NoSQL databases to understand. A key/value store can be seen as a large hash table. You associate each value with a unique key, and the database uses this key to determine the best location to store the data (using a hashing function that evenly distributes the data). The values saved in the Key/Value database are opaque to the database engine, therefore, to modify a value an application must overwrite the existing data for the entire value. Most implementations of the Key/Value stores provide an atomic way to read and write values.
Document databases are very similar to Key/Value stores except that the values stored are collections of named fields and values (documents). The data in the fields can be JSON, XML, BSON, or even plain text. The fields are exposed to the document database and this enables applications to query and filter data using the values in these fields. A typical document contains the entire data for an entity and does not require all documents to have the same structure. This free-form makes it very flexible and allows applications to store different documents as the business requirements change. Applications can query documents by using the document key or any of the values in the document fields. Most Document databases support indexing to provide fast lookup of documents based on an indexed field.
Column Family Databases
Column Family database also known as Wide Column databases are conceptually similar to relational databases. However, the real power of a column family database lies in its denormalized approach to structuring data. The relational approach is to store data in multiple tables and join the tables to retrieve an entity. However, the joins have a very significant impact on performance if there are large number of requests and the tables themselves are large. Column family databases help applications overcome the overhead associated with performing multiple joins to retrieve an entity by holding tabular data comprising logically related columns (column-families) and rows. This allows applications to retrieve all of the data for an entity with a single read operation. Also, column family databases implement bloom filters to help determine whether an item actually exists before attempting to retrieve it. In this way, the column family database does not have to spend time performing fruitless searches.
Graph databases allow you to store entities, but the main focus is on the relationship that these entities have with each other. Graph databases store nodes and edges and allow an application to efficiently perform queries that traverse the network of nodes and edges. These databases are very good at analyzing the relationships between entities and predicting new relationships.
Popular NoSQL databases by category
Azure Table Storage