Thursday, 2 October 2025

A summary of Databases

During a recent conversation I started to think about the various types of databases now available. What types are there? What are they used for? In a later article I will explore developments in databases.

Relational Database Management Systems (RDBMS)

Relational databases model data using rows and columns organised into a series of tables. This architecture became dominant in the 1980s. The design involves splitting data into a set of normalised tables, or relations, which aims to ensure that each elementary "fact" is stored only once, thereby simplifying update operations and helping to maintain consistency. The vast majority of these databases use Structured Query Language (SQL) for querying and writing data. Compared to non-relational databases, RDBMSs typically provide strong consistency (also known as immediate consistency).

Examples of Use: Relational systems dominate large-scale data processing applications. Specific implementations like PostgreSQL are often utilised for global mission-critical applications. This includes systems like the .org and .info domain name registries, as well as those used by many large companies and financial institutions. Traditional databases frequently use the SQL model.

Non-Relational (NoSQL) Databases

The term NoSQL originally meant "Not only SQL" or "non-relational," referring to a class of databases that diverge from the traditional table-based structure of relational databases. NoSQL databases typically use a single, simpler data structure—such as key–value pairs, graphs, or documents—and do not require a fixed schema. This flexible design allows them to scale easily for large, often unstructured datasets. NoSQL systems are generally designed to scale horizontally across clusters of machines and often prioritise speed and availability over strict consistency, frequently employing eventual consistency. NoSQL databases can be broadly categorised into four types: key-value stores, document databases, wide-column stores, and graph databases.

Examples of Use: NoSQL databases are popular for big data and real-time web applications. Their emergence was spurred by the scaling demands of Web 2.0 companies, such as social media platforms.

Key–Value Store

Key–value (KV) stores utilise the associative array (or map/dictionary) as their fundamental data model, representing data as a collection of key–value pairs where each key is unique. This is one of the simplest non-trivial data models. Since data storage is schema-less, the value associated with a key is typically a primitive data type or an object marshalled by the programming language. Some key-value stores feature ordering of keys, enabling efficient retrieval of specific key ranges.

Examples of Use: Notable examples of key–value stores include Redis, Amazon DynamoDB, and LMDB.

Document Database

The core concept of a document store is the "document," which encapsulates and encodes data using standard formats like JSON, XML, or binary forms like BSON. Each document is addressed by a unique key. Unlike tables in relational databases, documents within a collection do not necessarily need to have the same fields. Document databases belong to the main categories of NoSQL databases.

Examples of Use: Document databases are useful in applications where information is naturally viewed as a collection of documents with varying structure, such as scientific articles, patents, tax filings, or personnel records. MongoDB is an example of a distributed NoSQL database that stores data as BSON documents.

Graph Database

A graph database is a type of NoSQL database designed specifically to manage data whose relationships are best modelled as a graph structure composed of nodes, edges, and properties. These databases allow complex relationship queries to be performed efficiently.

Examples of Use: Graph databases are ideal for representing complex relationships such as social relations, road maps, network topologies, and public transport links. Notable examples include Neo4j and OrientDB.

Wide-Column Store

The wide-column store is classified as one of the four main categories of NoSQL databases. These systems model data using columns.

Examples of Use: Specific wide-column store implementations include Bigtable, Cassandra, and HBase.

Embedded Database

An embedded database system is a Database Management System (DBMS) that is tightly integrated with an application software, meaning it is embedded within the application rather than operating as a standalone system. The DBMS is generally hidden from the end-users of the application, and the system requires little or no ongoing maintenance. This category encompasses databases using various architectures (client-server or in-process) and models (relational, object-oriented, etc.).

Examples of Use: The most widely deployed SQL database engine globally, SQLite, is an embedded database, utilised in operating systems like Android, iOS, and Windows 10, as well as web browsers like Chromium. Informix Dynamic Server (IDS) is used in deeply embedded scenarios such as point of sale applications, financial transaction processing systems, and IP telephony call-processing systems.

In-Memory Database

An in-memory database primarily resides in the main memory of the computer, although it is typically backed up by non-volatile storage. The primary advantage of this approach is increased speed, as main memory access is faster than disk access.

Examples of Use: In-memory databases are deployed in situations where a critical response time is required, such as in telecommunications network equipment. solidDB is a hybrid in-memory relational database often used as an embedded system database in network software and telecommunications equipment, designed to handle tens of thousands of transactions per second with microsecond response times.

Vector Database

A vector database (or vector store/search engine) is a specialised system that stores vectors (fixed-length lists of numbers) using the vector space model. These vectors are high-dimensional mathematical representations of data, computed using machine learning methods like deep learning networks. They use approximate nearest neighbour algorithms to allow searching the database with a query vector to retrieve records that are the closest semantic match.

Examples of Use: Vector databases are used for similarity search, semantic search, multi-modal search, recommendation engines, and in conjunction with Large Language Models (LLMs). They are frequently used to implement Retrieval-Augmented Generation (RAG), a method for improving the domain-specific responses of LLMs. Implementations include Postgres with pgvector, MongoDB Atlas, and Apache Cassandra.

Blockchain-based Database

A blockchain-based database is a form of distributed database that combines traditional database features with distributed database concepts. Data is recorded and transacted through a Database Interface (or Compute Interface) supported by multiple layers of blockchains. The resulting database is an encrypted and immutable ledger that is open to everyone. The aim is to augment the features of SQL and NoSQL databases with blockchain properties, such as data immutability, transaction traceability, Byzantine fault tolerance, integrity assurance, and decentralised control.

Examples of Use: The Oracle DBMS currently implements support for this blockchain-based database model.

Immutable/Ledger Database (e.g., immudb)

An immutable database, such as immudb (which is also a ledger database), is designed for performance and tamper protection, ensuring that data can only be appended and never altered or deleted. It provides cryptographic verification of data integrity for every transaction and supports both SQL and Key/Value insertion. These systems offer an alternative to complex blockchain solutions.

Examples of Use: Immutable databases can be used to store every update made to sensitive database fields, such as credit card or bank account data, in an existing application database. They are also suitable for storing tamper-proof log streams, such as audit logs, and generating data change reports for compliance officers and auditors. A French financial services company successfully migrated from AWS QLDB (Quantum Ledger Database) to immudb.

Video