{
  "_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"
}