How to choose your database

Choosing a database management system for a new project can be tricky. Several criteria should be taken into consideration. In this article, I compare relational, NoSQL and NewSQL database models.

You can refer to my Databases 101 article for more information about these data models, and a glossary of the most common terms in the database world.

While choosing a database model, we generally have to keep these considerations in mind:

  • Does it need to support OLTP operations?
  • Does it need to support OLAP operations?
  • Is my data structured?
  • Do I have a high volume of data?

Database Models Comparison

Database Modelideal fornot ideal for
RelationalOLTPStructured dataHigh volume of data
NoSQLHigh volume of dataOLAPOLTPStructured data
NewSQLHigh volume of dataOLAPOLTPStructured Data

The NewSQL solution seems to promise the best of two worlds; ACID compliant (like relational databases) and horizontally scalable (like NoSQL databases). The only problem is the solution's maturity; it's not as mature as relational and NoSQL DBMSs.

Below are some useful material for further reading/listening/viewing.

  • The women in tech show podcast with Deepthi Sigireddi on databases scaling.
  • Software engineering daily podcast with Bryan Reinero on MongoDB.
  • Uber engineering blog on Schemaless.
  • Using Cassandra for storing financial transactions talk.
  • Introduction to Database Management Systems book.
  • Database Systems: Concepts, Design and Applications book.

Hope this article and the Databases 101 article helped with understanding the different tradeoffs we have to make when choosing a DBMS. You can reach out to me via Twitter if you want to chat more about it!