Which database engine should I use for my application?

Which database engine should I use for my application?

Elimination matrix

Narrow down the right database engine for your project by answering a series of questions about access patterns, consistency requirements, and scale.

Overview

Type
Elimination matrix
Entry
Q1
Questions
15
Outcomes
12
Author
Andrew
Last updated
2026-05-12

Decision Tree

Start: What best describes your primary data access pattern?

A: KEY-VALUE: Simple look-ups by a unique identifier — e.g. session stores, caches

  • Outcome: Redis
  • Outcome: Amazon DynamoDB
  • Outcome: MongoDB

B: RELATIONAL: Structured rows and columns with complex JOIN queries

  • Outcome: PostgreSQL
  • Outcome: MySQL
  • Outcome: Amazon Aurora

C: DOCUMENT: Semi-structured, flexible-schema records (JSON/BSON)

  • Outcome: MongoDB
  • Outcome: Azure Cosmos DB
  • Outcome: Google Cloud Firestore

D: TIME-SERIES: High-ingestion streams of time-stamped measurements

  • Outcome: InfluxDB
  • Outcome: TimescaleDB

E: GRAPH: Highly connected data with relationship traversal queries

  • Outcome: Neo4j
  • Outcome: Amazon Neptune

Machine-Readable JSON (Canonical Model)

View JSON
{
  "_meta": {
    "schema": "https://www.drawdecisiontree.com/decision-dag.schema.json",
    "source": "https://www.drawdecisiontree.com",
    "description": "DrawDecisionTree.com is a free tool for building, sharing, and embedding interactive decision trees. This file is the machine-readable export of a published decision tree. The `dsl` field contains the original source in the Decision DAG DSL; the `dag` schema is documented at the URL in `schema` above.",
    "links": {
      "interactive": "https://www.drawdecisiontree.com/t/drawdecisiontree/database-engine.html",
      "embed": "https://www.drawdecisiontree.com/embed/path/drawdecisiontree/database-engine",
      "dsl_reference": "https://www.drawdecisiontree.com/decision-tree-dsl-reference.html",
      "guides": "https://www.drawdecisiontree.com/guides",
      "schema_docs": "https://www.drawdecisiontree.com/decision-dag.schema.json",
      "author_trees": "https://www.drawdecisiontree.com/trees/drawdecisiontree"
    },
    "generated_at": "2026-05-29T12:05:39.278Z"
  },
  "author": {
    "handle": "drawdecisiontree",
    "first_name": "Andrew",
    "last_name": null,
    "avatar_url": "1d32d828-b6ca-40ec-bdd7-771fe7b9c36a/avatar-1778531481027.svg",
    "display_name": "Andrew"
  },
  "file": {
    "id": "e97f3052-6ccf-4294-9816-7538aa6b7949",
    "name": "Which database engine should I use for my application?",
    "public_slug": "database-engine",
    "updated_at": "2026-05-12T16:53:43.587978+00:00",
    "url": "https://www.drawdecisiontree.com/t/drawdecisiontree/database-engine.html",
    "json_url": "https://www.drawdecisiontree.com/t/drawdecisiontree/database-engine/tree.json",
    "dsl_url": "https://www.drawdecisiontree.com/t/drawdecisiontree/database-engine/tree.dag"
  },
  "meta": {
    "description": "Narrow down the right database engine for your project by answering a series of questions about access patterns, consistency requirements, and scale.",
    "mode": "elimination",
    "entry": "Q1",
    "tags": [],
    "image": null
  },
  "questions": [
    {
      "id": "Q1",
      "text": "What best describes your primary data access pattern?"
    },
    {
      "id": "A",
      "text": "KEY-VALUE: Simple look-ups by a unique identifier — e.g. session stores, caches [REDIS, DYNAMO, MONGO]"
    },
    {
      "id": "B",
      "text": "RELATIONAL: Structured rows and columns with complex JOIN queries [POSTGRES, MYSQL, AURORA]"
    },
    {
      "id": "C",
      "text": "DOCUMENT: Semi-structured, flexible-schema records (JSON/BSON) [MONGO, COSMOS, FIRESTORE]"
    },
    {
      "id": "D",
      "text": "TIME-SERIES: High-ingestion streams of time-stamped measurements [INFLUX, TIMESCALE]"
    },
    {
      "id": "E",
      "text": "GRAPH: Highly connected data with relationship traversal queries [NEO4J, NEPTUNE]"
    },
    {
      "id": "Q2",
      "text": "What is your consistency requirement?"
    },
    {
      "id": "A",
      "text": "STRONG: All reads must reflect the latest committed write [POSTGRES, AURORA, MYSQL]"
    },
    {
      "id": "B",
      "text": "EVENTUAL: Slight lag is acceptable in exchange for availability and scale [AURORA, COSMOS]"
    },
    {
      "id": "Q3",
      "text": "Do you need horizontal write-scaling across multiple regions?"
    },
    {
      "id": "A",
      "text": "YES: Multi-region active-active writes required [AURORA, COSMOS]"
    },
    {
      "id": "B",
      "text": "NO: Single primary writer is sufficient [POSTGRES, MYSQL, AURORA]"
    },
    {
      "id": "Q4",
      "text": "Is fully managed, serverless operation a hard requirement?"
    },
    {
      "id": "A",
      "text": "YES: No infrastructure management, auto-pause when idle [AURORA, DYNAMO, FIRESTORE, COSMOS]"
    },
    {
      "id": "B",
      "text": "NO: Self-managed or container-based is acceptable [POSTGRES, MYSQL, REDIS, MONGO, NEO4J, INFLUX, TIMESCALE, NEPTUNE]"
    }
  ],
  "outcomes": [
    {
      "id": "POSTGRES",
      "label": "PostgreSQL"
    },
    {
      "id": "MYSQL",
      "label": "MySQL"
    },
    {
      "id": "AURORA",
      "label": "Amazon Aurora"
    },
    {
      "id": "REDIS",
      "label": "Redis"
    },
    {
      "id": "DYNAMO",
      "label": "Amazon DynamoDB"
    },
    {
      "id": "MONGO",
      "label": "MongoDB"
    },
    {
      "id": "COSMOS",
      "label": "Azure Cosmos DB"
    },
    {
      "id": "FIRESTORE",
      "label": "Google Cloud Firestore"
    },
    {
      "id": "INFLUX",
      "label": "InfluxDB"
    },
    {
      "id": "TIMESCALE",
      "label": "TimescaleDB"
    },
    {
      "id": "NEO4J",
      "label": "Neo4j"
    },
    {
      "id": "NEPTUNE",
      "label": "Amazon Neptune"
    }
  ],
  "dsl": "dag: Which database engine should I use for my application?\nversion: 1.0.0\ndescription: Narrow down the right database engine for your project by answering a series of questions about access patterns, consistency requirements, and scale.\nentry: Q1\nmode: elimination\n\nQ1: What best describes your primary data access pattern?\n  A: KEY-VALUE: Simple look-ups by a unique identifier — e.g. session stores, caches [REDIS, DYNAMO, MONGO]\n  B: RELATIONAL: Structured rows and columns with complex JOIN queries [POSTGRES, MYSQL, AURORA]\n  C: DOCUMENT: Semi-structured, flexible-schema records (JSON/BSON) [MONGO, COSMOS, FIRESTORE]\n  D: TIME-SERIES: High-ingestion streams of time-stamped measurements [INFLUX, TIMESCALE]\n  E: GRAPH: Highly connected data with relationship traversal queries [NEO4J, NEPTUNE]\n\nQ2: What is your consistency requirement?\n  when: Q1=B\n  A: STRONG: All reads must reflect the latest committed write [POSTGRES, AURORA, MYSQL]\n  B: EVENTUAL: Slight lag is acceptable in exchange for availability and scale [AURORA, COSMOS]\n\nQ3: Do you need horizontal write-scaling across multiple regions?\n  when: Q2=A\n  A: YES: Multi-region active-active writes required [AURORA, COSMOS]\n  B: NO: Single primary writer is sufficient [POSTGRES, MYSQL, AURORA]\n\nQ4: Is fully managed, serverless operation a hard requirement?\n  A: YES: No infrastructure management, auto-pause when idle [AURORA, DYNAMO, FIRESTORE, COSMOS]\n  B: NO: Self-managed or container-based is acceptable [POSTGRES, MYSQL, REDIS, MONGO, NEO4J, INFLUX, TIMESCALE, NEPTUNE]\n\n[POSTGRES]: PostgreSQL\n  color: #336791\n  description: The world's most advanced open-source relational database. Excellent SQL compliance, rich extension ecosystem (PostGIS, pgvector), and strong ACID guarantees.\n  code: DB_POSTGRES\n\n[MYSQL]: MySQL\n  color: #4479A1\n  description: Widely adopted open-source RDBMS. Large hosting ecosystem, excellent read-replica support, and strong community tooling.\n  code: DB_MYSQL\n\n[AURORA]: Amazon Aurora\n  color: #FF9900\n  description: AWS-managed, MySQL/PostgreSQL-compatible engine with up to 5x throughput. Supports serverless v2 and global database for multi-region active-active writes.\n  code: DB_AURORA\n\n[REDIS]: Redis\n  color: #DC382D\n  description: In-memory data structure store, used as cache, message broker, or session store. Sub-millisecond latency with optional persistence.\n  code: DB_REDIS\n\n[DYNAMO]: Amazon DynamoDB\n  color: #FF9900\n  description: Fully managed NoSQL key-value and document database. Single-digit millisecond performance at any scale with on-demand capacity mode.\n  code: DB_DYNAMO\n\n[MONGO]: MongoDB\n  color: #47A248\n  description: General-purpose document database with a flexible schema. Rich query language, multi-document ACID transactions, and Atlas managed cloud offering.\n  code: DB_MONGO\n\n[COSMOS]: Azure Cosmos DB\n  color: #0078D4\n  description: Globally distributed, multi-model database service from Microsoft. Supports multiple consistency levels (from eventual to strong) and multi-region writes.\n  code: DB_COSMOS\n\n[FIRESTORE]: Google Cloud Firestore\n  color: #FFCA28\n  description: Serverless, fully managed document database. Real-time synchronisation, automatic multi-region replication, and tight Firebase / GCP integration.\n  code: DB_FIRESTORE\n\n[INFLUX]: InfluxDB\n  color: #22ADF6\n  description: Purpose-built time-series platform with a powerful query language (Flux). High-ingestion write throughput with built-in downsampling and retention policies.\n  code: DB_INFLUX\n\n[TIMESCALE]: TimescaleDB\n  color: #FDB515\n  description: PostgreSQL extension for time-series data. Brings the full SQL ecosystem to time-series workloads with automatic partitioning and continuous aggregates.\n  code: DB_TIMESCALE\n\n[NEO4J]: Neo4j\n  color: #008CC1\n  description: Native graph database with the Cypher query language. Excellent for knowledge graphs, fraud detection, recommendation engines, and network analysis.\n  code: DB_NEO4J\n\n[NEPTUNE]: Amazon Neptune\n  color: #FF9900\n  description: Fully managed graph database supporting both Gremlin and SPARQL. Tightly integrated with the AWS ecosystem for serverless graph workloads.\n  code: DB_NEPTUNE\n"
}

DSL Representation

dag: Which database engine should I use for my application?
version: 1.0.0
description: Narrow down the right database engine for your project by answering a series of questions about access patterns, consistency requirements, and scale.
entry: Q1
mode: elimination

Q1: What best describes your primary data access pattern?
  A: KEY-VALUE: Simple look-ups by a unique identifier — e.g. session stores, caches [REDIS, DYNAMO, MONGO]
  B: RELATIONAL: Structured rows and columns with complex JOIN queries [POSTGRES, MYSQL, AURORA]
  C: DOCUMENT: Semi-structured, flexible-schema records (JSON/BSON) [MONGO, COSMOS, FIRESTORE]
  D: TIME-SERIES: High-ingestion streams of time-stamped measurements [INFLUX, TIMESCALE]
  E: GRAPH: Highly connected data with relationship traversal queries [NEO4J, NEPTUNE]

Q2: What is your consistency requirement?
  when: Q1=B
  A: STRONG: All reads must reflect the latest committed write [POSTGRES, AURORA, MYSQL]
  B: EVENTUAL: Slight lag is acceptable in exchange for availability and scale [AURORA, COSMOS]

Q3: Do you need horizontal write-scaling across multiple regions?
  when: Q2=A
  A: YES: Multi-region active-active writes required [AURORA, COSMOS]
  B: NO: Single primary writer is sufficient [POSTGRES, MYSQL, AURORA]

Q4: Is fully managed, serverless operation a hard requirement?
  A: YES: No infrastructure management, auto-pause when idle [AURORA, DYNAMO, FIRESTORE, COSMOS]
  B: NO: Self-managed or container-based is acceptable [POSTGRES, MYSQL, REDIS, MONGO, NEO4J, INFLUX, TIMESCALE, NEPTUNE]

[POSTGRES]: PostgreSQL
  color: #336791
  description: The world's most advanced open-source relational database. Excellent SQL compliance, rich extension ecosystem (PostGIS, pgvector), and strong ACID guarantees.
  code: DB_POSTGRES

[MYSQL]: MySQL
  color: #4479A1
  description: Widely adopted open-source RDBMS. Large hosting ecosystem, excellent read-replica support, and strong community tooling.
  code: DB_MYSQL

[AURORA]: Amazon Aurora
  color: #FF9900
  description: AWS-managed, MySQL/PostgreSQL-compatible engine with up to 5x throughput. Supports serverless v2 and global database for multi-region active-active writes.
  code: DB_AURORA

[REDIS]: Redis
  color: #DC382D
  description: In-memory data structure store, used as cache, message broker, or session store. Sub-millisecond latency with optional persistence.
  code: DB_REDIS

[DYNAMO]: Amazon DynamoDB
  color: #FF9900
  description: Fully managed NoSQL key-value and document database. Single-digit millisecond performance at any scale with on-demand capacity mode.
  code: DB_DYNAMO

[MONGO]: MongoDB
  color: #47A248
  description: General-purpose document database with a flexible schema. Rich query language, multi-document ACID transactions, and Atlas managed cloud offering.
  code: DB_MONGO

[COSMOS]: Azure Cosmos DB
  color: #0078D4
  description: Globally distributed, multi-model database service from Microsoft. Supports multiple consistency levels (from eventual to strong) and multi-region writes.
  code: DB_COSMOS

[FIRESTORE]: Google Cloud Firestore
  color: #FFCA28
  description: Serverless, fully managed document database. Real-time synchronisation, automatic multi-region replication, and tight Firebase / GCP integration.
  code: DB_FIRESTORE

[INFLUX]: InfluxDB
  color: #22ADF6
  description: Purpose-built time-series platform with a powerful query language (Flux). High-ingestion write throughput with built-in downsampling and retention policies.
  code: DB_INFLUX

[TIMESCALE]: TimescaleDB
  color: #FDB515
  description: PostgreSQL extension for time-series data. Brings the full SQL ecosystem to time-series workloads with automatic partitioning and continuous aggregates.
  code: DB_TIMESCALE

[NEO4J]: Neo4j
  color: #008CC1
  description: Native graph database with the Cypher query language. Excellent for knowledge graphs, fraud detection, recommendation engines, and network analysis.
  code: DB_NEO4J

[NEPTUNE]: Amazon Neptune
  color: #FF9900
  description: Fully managed graph database supporting both Gremlin and SPARQL. Tightly integrated with the AWS ecosystem for serverless graph workloads.
  code: DB_NEPTUNE

Machine Access

Questions in this decision tree

Possible outcomes

How to use this decision tree

Click "Open interactive version" to step through the questions. Your answers narrow the tree until a recommended outcome is reached. You can also embed this tree on your own site.

More decision trees by Andrew

Which API design pattern is right for my project?
Which API design pattern is right for my project?
Determine the right API design style for your integration scenario.
Authentication Method Selection
Authentication Method Selection
Authentication is a security-critical, high-friction decision to reverse — migrating users from one auth method to another requires coordinated password resets or credential migration campaigns. This tree eliminates methods that don't match your user type, enterprise requirements, and security posture, giving you a clear shortlist before you write a line of code.
Caching Strategy Selection
Caching Strategy Selection
Premature or misapplied caching adds complexity — stale data bugs, invalidation logic, and distributed consistency problems — without solving the actual bottleneck. This tree routes you to the caching pattern that matches your data access profile, so you apply the right tool to the right problem rather than defaulting to Redis for everything.
CI/CD Pipeline Tool Selection
CI/CD Pipeline Tool Selection
Choosing a CI/CD platform is a long-term infrastructure commitment — pipelines accumulate config, custom scripts, and team muscle memory that make switching painful. This tree eliminates tools that don't fit your source control host, infrastructure model, or team scale, leaving only the options genuinely viable for your situation.
Which cloud provider should I use — AWS, Azure, or Google Cloud?
Which cloud provider should I use — AWS, Azure, or Google Cloud?
Answer a few questions to identify the most suitable cloud platform for your workload.
Container Orchestration Platform Selection
Container Orchestration Platform Selection
Container orchestration is foundational infrastructure — the platform you choose shapes how you deploy, scale, network, and operate every service you run. This tree eliminates options that don't match your operational maturity, cloud provider commitment, and workload complexity, so you land on the platform that fits your team today without over-engineering for a scale you haven't reached.