The non-relational database paradigm—we’ll call it NoSQL throughout this book, following now-standard usage—is no longer the fledgling upstart that it once was. When the NoSQL alternative to relational databases came on the scene, the “old” model was the de facto option for problems big and small. Today, that relational model is still going strong and for many reasons:
Databases such as PostgreSQL, MySQL, Microsoft SQL Server, and Oracle, amongst many others, are still widely used, discussed, and actively developed.
Knowing how to run SQL queries remains a highly sought-after skill for software engineers, data analysts, and others.
There remains a vast universe of use cases for which a relational database is still beyond any reasonable doubt the way to go.
But at the same time, NoSQL has risen far beyond its initial upstart status and is now a fixture in the technology world. The concepts surrounding it, such as the CAP theorem, are widely discussed at programming conferences, on Hacker News, on StackOverflow, and beyond. Schemaless design, massive horizontal scaling capabilities, simple replication, new query methods that don’t feel like SQL at all—these hallmarks of NoSQL have all gone mainstream. Not long ago, a Fortune 500 CTO may have looked at NoSQL solutions with bemusement if not horror; now, a CTO would be crazy not to at least consider them for some of their workloads.
In this book, we explore seven databases across a wide spectrum of database styles. We start with a relational database, PostgreSQL, largely for the sake of comparison (though Postgres is quite interesting in its own right). From there, things get a lot stranger as we wade into a world of databases united above all by what they aren’t. In the process of reading this book, you will learn the various capabilities that each database presents along with some inevitable trade-offs—rich vs. fast queryability, absolute vs. eventual consistency, and so on—and how to make deeply informed decisions for your use cases.