Databases

Most applications need to store and access structured information, which is typically organised into a database. These databases are generally managed by a piece of software, the database management system (DBMS), through which the application can interact with the database1.

Database systems exist in many shapes in forms. For the past decades, relational databases — which can be queried and modified by using the structured query language (SQL) — have been the dominant type1. In this type of DBMS, data is organised into tables with rows and columns2. Each row in the table contains a data record, which each column being a property of it. Because every data record has a unique identifier, relations can be established between records in different tables.

Recently, however, other types of databases have emerged and become more popular. These are broadly categorised as NoSQL databases, as they use other languages for accessing the data. With these database systems, data is stored differently to relational databases3. For example, some store data as schemaless documents with keys and values, some as graphs with nodes and edges, and some only associate keys and values.

Selection

To come to a selection of databases, I took into consideration the most popular database technologies according to the Stack Overflow Dev Survey4 and the DB-Engines5 ranking. These were further filtered down based on the following criteria:

  • The technology must be a server that can be self-hosted.
  • The technology must be broadly applicable (instead of focussing on specific types of data, such as text search, time series, or spatial data)
  • The technology must be available under an open-source license.

This lead to the following final selection of databases:

Criteria

To come to an objective choice, I will compare the database systems based on the criteria listed below.

Data integrity

Weight: 5. The database should make sure that data integrity is maintained by compling with ACID (Atomicity, Consistency, Isolation, Durability) principles. In addition, the data model should aid in keeping data items consistent.

Handling necessary data

Weight: 5. Although the data requirements of the target use of our application are not massive, the database system should still be able to comfortably handle items for hundreds of users, thousands of albums, and millions of pictures.

JavaScript support

Weight: 5. To be able to use the database from the application, it should have supporting libraries available for JavaScript. Preferrably, these should also have typing support by using TypeScript.

Performance

Weight: 3. The database system should be able to handle queries quickly, even under higher loads.

Query support

Weight: 3. Advanced query support, such as combining data from multiple sources, can avoid having to do multiple

Scalability

Weight: 2. Being able to scale the database can allow our application to grow to larger sizes by storing more information and being able to handle more requests.