SQL Dialects & Portability
Choosing a Relational Database
Database selection is an evidence-backed fit decision under explicit assumptions. Start with correctness and workload, then test operability, recovery, ecosystem, deployment constraints, staffing, lifecycle cost, and acceptable specialization instead of applying a universal product ranking.
- Correctness requirements are gates.
- Use representative workload shapes.
- The deployment is part of the product.
- Operability must be demonstrated.
- Ecosystem includes people.
- Cost is lifecycle risk-adjusted cost.
- Revisit the decision.
| Dimension | Evidence to collect | Gate or scored question |
|---|---|---|
| Correctness | invariant/concurrency/type tests | all required histories preserved? |
| Query/workload | production-shaped plans and p95/p99 | objectives at peak plus headroom? |
| Evolution | large-table migration rehearsals | blocking/failure/resume acceptable? |
| Recovery/reliability | restore, PITR, failover drills | measured RPO/RTO and data loss? |
| Observability/security | least privilege, audit, waits/plans | operators can detect and diagnose safely? |
| Deployment/lifecycle | upgrade, patch, topology, limits | fits platform and ownership model? |
| Ecosystem/skills | driver/tool support and staffing | supportable on call for years? |
| Economics/exit | 3–5 year scenarios and export | risk-adjusted cost and exit acceptable? |
1. Load production-shaped volume, skew, Unicode/time/null edge corpus.
2. Enforce canonical commerce constraints and run concurrent checkout/inventory histories.
3. Run critical joins, search, pagination, reports, imports, and maintenance together.
4. Capture plans, waits, lock chains, resource curves, tail latency, and cost drivers.
5. Exercise required extensions and driver/ORM/migration tooling.
6. Rehearse expand-contract migration, backup restore, PITR, replica lag, failover, and upgrade.
7. Test least privilege, audit evidence, observability, deployment automation, and support escalation.
8. Export schema/data to the stated exit format and estimate conversion loss/time.
9. Publish raw results, assumptions, uncertainty, owners, and rejection criteria.