Database Discussion/

Databases Tree

Lesson overview

Databases Tree

Visual taxonomy of database types and their relationships.

DATABASES — System Design

NoSQL families

Comparison panels

RELATIONAL (SQL)

Tables · Schema · ACID · JOINs · The Default

Rows + columns in tables with a fixed schema. Tables linked by foreign keys. Queried in SQL. ACID transactions guarantee correctness across multi-row writes.

Universal SQL skill. ACID = no silent corruption. 50 years of tooling: ORMs, replicas, indexes, backups. Best default for any OLTP workload until proven otherwise.

Open-source king. JSONB, arrays, GIS (PostGIS), full-text search, pgvector for AI. Pick when you want correctness + flexibility for the next 10 years. The boring-best choice.

Fastest simple SELECTs. Powers WordPress, Shopify, early Facebook. Pick for read-heavy web apps, simple schemas, when ops want familiarity / hosting compatibility.

Single file, no server. Lives inside every iPhone, Android, browser. Pick for mobile, desktop, edge functions, CLIs, tests, prototypes — anything single-machine, < 1 TB.

MySQL fork by the original creator (after Oracle bought MySQL). Drop-in replacement. More open license, slightly faster on some workloads. Pick over MySQL for OSS purity.

Enterprise tank. PL/SQL, partitioning, RAC clustering, materialised views. Pick for legacy banks, telcos, government. $$$$ licensing but unmatched at huge OLTP under brutal load.

MS SQL Server

Microsoft stack. T-SQL, columnstore indexes, SSRS reporting, tight Azure / .NET integration. Pick if your shop lives in the Microsoft world. Excellent SSMS tooling but Windows-centric.

▶ VERDICT — WHEN TO PICK

DEFAULT TO POSTGRESQL. Pick MySQL only for legacy WordPress / pure read-speed. SQLite for embedded / mobile / edge. Oracle / SQL Server only when org dictates. Aurora (managed PG/MySQL on AWS) is a great upgrade once you outgrow a single box.

KEY-VALUE STORE

Hashmap at planetary scale · Microsecond reads

key → value. No schema, no joins. Get / set / delete by key. Some variants add data structures (lists, sets) or persistence. Can be in-memory, on-disk, or hybrid.

Microsecond latency. Trivially shardable by key — scale by adding nodes. Perfect for caches, sessions, rate limits, leaderboards, feature flags — anywhere the access pattern is `get(id)`.

In-memory + optional disk. Rich types: lists, sets, sorted sets, streams, geospatial, pub/sub, scripting. The 99% pick: cache, session store, rate limiter, queue, leaderboard, real-time counters.

Pure RAM cache. Multi-threaded, no persistence, no data types. Simpler & sometimes faster than Redis for one job: ephemeral cache. Pick only when you literally need nothing else.

Loading Databases Tree