What is NoSQL?
Relational and Non-Relational Databases. All a “database” really is is an organized collection of data. Throughout the 80s, 90s, and 00s, “relational” databases supporting Structured Query Language (SQL) became the dominant type of database – and they still are. That was for a very good reason – relational databases made things easier. As the types of applications that are using databases have changed, however, non-relational databases have become more important. Non-relational, or “NoSQL” databases, started becoming more popular in 2009 and are now dominant for some types of “organized collections of data”.
ACID and BASE. Proponents of NoSQL like to suggest that NoSQL stands for “Not Only” SQL, but the original definition simply implies that SQL was not supported. The truth is that relational and NoSQL databases each have strengths and weaknesses that make them suitable for different categories of applications. The properties of relational databases can be described by the acronym ACID – for Atomicity, Consistency, Isolation, and Durability. The properties of NoSQL databases can be described by the acronym BASE, for Basically Available, Soft state, and Eventual consistency.
Doesn’t BASE Sound Less Solid Than ACID? With words like “basically”, “soft”, and “eventual” in the acronym, it is true that if you need the utmost in accurate and timely databases, relational is the best option. In fact, for small – and even relatively large – amounts of data, it is generally hard to argue against using relational databases. Nonetheless, those same qualities allow NoSQL databases to offer unlimited scalability, lower cost, and faster performance. If your database “must” support ACID properties, then a relational database is your only real option.
When NoSQL is Better. If you need to scale quickly or need unlimited scalability, need very fast queries, manage “huge” amounts of data, or need to minimize costs AND can forego ACID properties, then NoSQL will typically be preferred over a relational database.
Typical NoSQL Applications. You typically would not want to consider NoSQL for transaction processing applications, of course, but there are many categories of applications for which NoSQL is preferred. These types of applications include caching, shopping carts, historical records, web site content, and big data applications. Consider Facebook, which has over two billion active users – does it seem reasonable to expect a single relational database to handle that? No, but NoSQL databases can because ACID properties are not needed.
Different Types of NoSQL Databases. While relational database from different vendors have some differences, the feature sets are generally similar. For new applications, almost any relational database will do. This is not true are for NoSQL databases – NoSQL is a broad category and there are many different types of NoSQL databases. The broad categories include key/value stores, wide column stores, document stores, and graph databases.