Database

Every modern web application has some sort of database. Or several databases even. In the old days, there were just relational databases and the differences were in performance and features. Today, we’re in the age of "specialized databases". We need different databases for different purposes, which makes this decision pretty important. I’d say even more important than the previous decisions of server-side and client-side technology because those offer pretty much the same thing in different flavors.

Elastic Search - if your product needs high-performance Search capabilities;

Redis - if you have a high-load of similar requests, whose response doesn’t change very frequently.

MongoDB - if you just want to store a bunch of JSON documents without much fuss.

Database types

Relational databases

NoSql databases

Preformance

https://db-engines.com/en/ranking

When choosing

  • Some of the commercial databases like Oracle and SQL Server can be quite pricey. Consider using one of the many open-source databases if the cost is an issue and you have a lot of data.

  • Relational database stood the test of time. They are fast, reliable and have a ton of tools that work with them. You’ll also find more developers familiar with the technology.

  • If you’re using a certain cloud provider, see which databases they support as cloud-as-a-service. This can reduce some initial development time when starting out. You might not actually need your cloud provider because there are services that provide independent database-as-a-service services like MongoDB Atlas.

  • For small web applications, the considerations are different than for large enterprise applications. You’ll need databases with the ability to scale, possibly to multiple machines (sharding).

  • For distributed databases, consider the CAP theorem. It states that a database can provide only as much 2 out of 3 guarantees between Consistency, Availability, and Partition tolerance. Consider which two guarantees are most important to your needs and which database provides those two.

  • For big applications or apps with high-frequency requests, you’ll need to consider performance. One of the best places to find performance comparisons is DB-ENGINES. Here are the latest scores while writing this:

Last updated

Was this helpful?