When not to choose a NoSQL database?
NoSQL databases typically rely on de-normalized data, supporting the types of applications that use fewer tables (or containers) and whose data relationships are not modeled using references, but rather as embedded records (or documents). Many classic back-office business applications in finance, accounting, and enterprise resource planning rely on highly normalized data to prevent data anomalies as well as data duplication. These are the typically the types of applications that are not a good fit for a NoSQL Database.
Another distinction of NoSQL databases is query complexity. NoSQL databases work phenomenally well with queries against a single table. However, as the complexity of the queries increase, relational databases are a better choice. NoSQL database typically do not offer complex joins, sub-queries, and nesting of queries in a WHERE clause.
Sometimes, though, there doesn’t need to be a choice between relational and nonrelational databases. On many occasions, companies have opted for databases that offer a converged model, in which they are able to employ a combination of a relational and nonrelational data models. This hybrid approach offers increased flexibility in handling different types of data, while also ensuring read and write consistency without degrading performance.
What does NoSQL offer that other databases don’t?
One of the main differentiators between NoSQL databases and other types of databases is that NoSQL databases typically use unstructured storage. Developed within the last two decades, NoSQL databases were designed for fast, simple queries, vast data, and frequent application changes. In addition, these databases also make programming much simpler for developers.
Another important differentiator is that NoSQL databases rely on a process called “sharding” to scale out horizontally, which means that more machines can be added to handle data across multiple servers. The vertical scaling that’s found in other SQL databases requires adding more power and memory to the existing machine, which can be unsustainable as more and more storage is needed.
The nature of horizontal scaling with NoSQL databases means that they can handle extremely large amounts of data—even as the data is growing—in a more efficient way. It can be helpful to think of vertical scaling like adding a new floor to your house, whereas horizontal scaling is like building another house right next door to the original one.