NoSQL database types comparison in examples
NoSQL (Not only SQL) term covers different database technologies that were developed to handle huge unstructured data volumes and the frequency in which this data is accessed as well as performance and processing needs. NoSQL is NOT a database that we used to think. In my understanding NoSQL is a range of technologies, approaches and even projects directed to realization of unstructured – so-called Big Data models – that have considerable differences to traditional Relational Database Management Systems (RDBMS). The main goal of NoSQL storage systems is to resolve unstructured data manipulation issues that are not efficiently managed by RDBMS. Note, I’m not saying RDBMS can not manage the same unstructured stuff. On the contrary, with new features the modern RDBMS can do more and more in the Big Data area but obviously not as efficient as some NoSQL solutions.
In practice, “NoSQL” means non-relational database, but this concept of NoSQL does not disclaim SQL language completely often however querying these databases in data-model specific way. Anyway, the underlying query execution strategy is usually very different from the way a traditional RDBMS would use.
Many of the NoSQL platforms allow for RESTful interfaces to the data, while others offer query APIs. NoSQL storage systems are often used in combination with Hadoop Distributed File System that enables large scale computations on clustered servers.
Important to mention that NoSQL databases are not General-Purpose Database Management Systems, but they are very specific to application use cases. Also, NoSQL engines are not compatible to each other and NOT to the General-Purpose DBMSs.
See below some common attributes of noSQL databases:
• Specialized databases for various scenarios
• They manage Unstructured Data (Big Data)
• Often as pure data stores offering just standard APIs for developers
• Non-Relational data model is optimized for the type of data being stored
• Underlying query execution done in data-model specific way
• Usually do NOT support ANSI SQL and ACID standards
• Usually do NOT support transactions and data consistency across entire DB
• Usually optimized for high performance data loads and reads
• Data Updates are often slow
• Table Joins are usually NOT supported
• Usually do NOT include comprehensive Database Manageability features
The data in NoSQL DB engines are represented in a view of hash-tables, tries, documents etc. Based on this representation approach they are divided into four major categories or types: Key-Value Stores, Document Databases, Column Stores and Graph databases. See their description below:
The data is represented in hash tables, every with a unique key with pointers to particular items of data.
Key-values Stores are easiest to implement but inefficient in updating and querying only a part of a value, among other disadvantages.
NoSQL document databases represent the next level of Key-value stores providing more efficient querying mechanisms and designed to handle document-oriented information, also known as semi-structured data that is stored in formats like JSON. They provide a model of versioned documents that are collections of other key-value collections allowing nested values associated with each key.
They usually can store and process large amounts of data distributed over many servers. They have table keys that point not to a single data item as with Key-Value stores but to multiple columns. The columns are arranged by column family.
Instead of tables with rows and columns NoSQL Graph databases use graph structures with nodes, properties and edges to represent and store data that again can scale across multiple servers. The graph nodes represent entities like products, articles, accounts or any other item you want to keep track of.
That was NoSQL database type comparison in examples. In my next article What noSQL database to choose I give more details on a few of these NoSQL solutions and advice how to choose the right one for your use case.