Choosing which database for your system might be one of the crucial decisions to make. Whether relational databases such as PostgreSQL and MySQL that provide ACID transactions and standardized SQL syntax, or NoSQL such as MongoDB that provides horizontally scaling storage and high availability.

Both have their own advantages against each other and have been a solid choices for all developers. But what If we want a solid distributed database that still provides ACID Transactions yet still horizontally scalable?

Yeah, you can still use Master-Slave Replication in Relational Databases, but does it really scales? It only scales for the read capability, while insert, update and delete still go to Master.

We could also do vertical scaling in relational databases by upgrading the specification of the servers. But isn’t it costly? And it does lack the elasticity of scales itself. So we will be having a hard time to grow and shrink the database, adapting with the needs of the system.

In the end, relational databases are not meant and will always not meant to hosted on a distributed system. While NoSQL also doesn’t provide ACID Transactions that is commonly needed in most of the system.

Introducing NewSQL

GIF from CockroachDB Interactive Demo

NoSQL such as CockroachDB is a distributed database system that builds on RocksDB (Persistent Key Value Store Database) and provides horizontally scalable system, ACID Transactions using standardized familiar SQL for querying.

CockroachDB is inspired by Google’s Spanner and F1 technologies, and fortunately, this is an open source databases that could be run on multiple nodes across multiple server. As the name suggests, it provides a resilience of the cockroach itself.

#cockroachdb #web-development #database #backend-development #computer-science

CockroachDB : NewSQL as a Choice of Database
2.10 GEEK