Database Categories & Selection Guide - CodeSwordsman

Mainstream databases grouped by relational, key-value, document, wide-column, graph, time-series and NewSQL, with a selection guide for common workloads.

UniversalUpdated 2026-10-3028 commands

Relational Databases (SQL)

The most popular open-source relational database and the default for web apps; MariaDB is a compatible fork with nearly identical syntax and protocol

MySQL / MariaDB

A MySQL cheat sheet is available; MariaDB users can follow it directly

Advanced open-source engine with strong complex queries, GIS via PostGIS and JSONB support

PostgreSQL

A PostgreSQL cheat sheet is available

Commercial enterprise database common in finance and telecom core systems; full-featured but expensive to license

Oracle

An Oracle cheat sheet is available

Microsoft commercial database tightly integrated with Windows and .NET, also available on Linux

SQL Server

A SQL Server cheat sheet is available

A file-based embedded database with no server process, common in mobile apps and local tools

SQLite

A SQLite cheat sheet is available

IBM commercial database widely used in large government and banking core systems

DB2

Microsoft desktop database for single-machine data handling; rarely used behind a backend service

Access

Key-Value Stores

In-memory key-value store used for caching, counters, distributed locks and light queues, with several persistence modes

Redis

A Redis cheat sheet is available

Pure in-memory cache with a simple protocol and high multi-threaded throughput; no persistence or rich data types

Memcached

A Memcached cheat sheet is available

Document Databases

The most common document database, storing BSON with a flexible schema for fast-changing product data

MongoDB

A MongoDB cheat sheet is available

Open-source document store with an HTTP/JSON API plus built-in multi-version replication and conflict handling

CouchDB

Wide-Column Stores

Highly available, masterless wide-column store suited to massive time-series data and write-heavy workloads

Cassandra

Hadoop-ecosystem wide-column store on HDFS, used for big-data batch and near-real-time storage

HBase

Graph Databases

The most widely used graph database with the Cypher query language, suited to social graphs and knowledge graphs

Neo4j

Chinese open-source distributed graph database handling hundreds of billions of vertices and edges

NebulaGraph

Time-Series Databases

Purpose-built time-series database with fast writes and aggregation, suited to metrics and IoT data

InfluxDB

The default for cloud-native monitoring, shipping a built-in TSDB and PromQL and usually paired with Grafana

Prometheus

A PostgreSQL extension for time-series data that keeps full SQL support, ideal for existing PG stacks

TimescaleDB

Chinese high-performance time-series database optimized for devices and sensors with strong write compression

TDengine

NewSQL

Chinese distributed database compatible with the MySQL protocol, scaling horizontally and covering HTAP workloads

TiDB

Distributed SQL database compatible with the PostgreSQL protocol, strongly consistent across regions

CockroachDB

Google Cloud globally distributed database with strong consistency and automatic sharding, available on GCP

Spanner

Selection by Workload

Start with MySQL or PostgreSQL: mature ecosystem, abundant operations talent and cheap managed offerings

Web app / small to medium project

Choose PostgreSQL with PostGIS and JSONB for stronger complex queries and indexing

Complex analytics / GIS / JSON

Use Redis for caching, sessions and locks; Memcached fits simple high-throughput caching only

Cache / session / distributed lock

Use Prometheus for collection, and InfluxDB, TimescaleDB or TDengine for long-term storage and aggregation

Monitoring / IoT metrics

Pick Cassandra or HBase for write-heavy massive data, balancing throughput against operational cost

Massive writes / log pipeline

Use Neo4j or NebulaGraph for deep relationship traversal instead of recursive joins in a relational database

Social graph / knowledge graph

This website uses cookies to ensure you get the best experience on our website. Privacy Policy.