Postgres vs MySQL vs MongoDB

Database choice.

Overview

Postgres, MySQL, and MongoDB are the three databases most production stacks pick from. Postgres leads on rich relational features (JSONB, CTEs, window functions, extensions); MySQL leads on simpler operations (broad managed-service support, simpler replication); MongoDB leads on document-first workloads (variable schema, native aggregation pipelines). Picking the right one at design time avoids the migration that costs an engineer-quarter at year three.

The approach

Workload-driven choice, per-team operational fit considered, documented rationale per database. The discipline is matching the engine to the workload's access patterns rather than picking by team familiarity alone, then capturing the reasoning so future investigations have the breadcrumbs.

Why this compounds

The right database choice compounds across years. Wrong choices pay performance or migration penalties indefinitely; right choices pay neither. Cross-database tooling (operational runbooks, capacity planning) gets built once per engine and reused. By year two the choice is automatic per workload.