| 1 | --- |
| 2 | title: Databases |
| 3 | description: Compare database engines, connection paths, and deployment guides across Alchemy's SQL providers. |
| 4 | --- |
| 5 | |
| 6 | Choose the database independently from the application runtime where supported. For example, a Cloudflare Worker or Hetzner application can both use Neon Postgres. |
| 7 | |
| 8 | ## Choose a database |
| 9 | |
| 10 | | Database | Engine | Connection path | Setup | |
| 11 | | --- | --- | --- | --- | |
| 12 | | AWS RDS / Aurora | Postgres or MySQL | VPC connection; Data API on supported configurations | [RDS & Aurora](/aws/data/rds) · [Aurora + Drizzle](/aws/data/drizzle-aurora) | |
| 13 | | Aurora DSQL | Distributed SQL with Postgres wire compatibility | IAM-authenticated connection | [DSQL + Drizzle](/aws/data/drizzle-dsql) | |
| 14 | | Cloudflare D1 | SQLite | Native Worker binding | [D1 + Drizzle](/cloudflare/data/d1-drizzle) | |
| 15 | | Durable Object storage | SQLite per named object | Instance storage | [Durable Objects](/cloudflare/compute/durable-objects#sql-migrations) | |
| 16 | | Fly Managed Postgres | Postgres | Private connection from a Fly Service | [Managed Postgres](/fly/data/postgres) | |
| 17 | | Neon | Postgres | Direct or pooled URL; Hyperdrive from Workers | [Neon branches](/neon/data/branching) · [Connections](/neon/data/connections) | |
| 18 | | PlanetScale Postgres | Postgres | Role connection URL; Hyperdrive from Workers | [PlanetScale Postgres](/planetscale/data/postgres) | |
| 19 | | PlanetScale Vitess | MySQL | Password connection URL; Hyperdrive from Workers | [PlanetScale MySQL](/planetscale/data/mysql) | |
| 20 | | Prisma Postgres | Postgres | Database connection URL | [Prisma Postgres](/prisma/data/postgres) | |
| 21 | | Railway Postgres | Postgres | Private service URL or public TCP proxy | [Railway Postgres](/railway/data/postgres) | |
| 22 | | Railway MySQL | MySQL | Private service URL or public TCP proxy | [Railway MySQL](/railway/data/mysql) | |
| 23 | |
| 24 | [Hyperdrive](/cloudflare/data/hyperdrive) pools connections to a database; it is not a database itself. The [Hetzner guide](/hetzner/data/drizzle-postgres) hosts the application on Hetzner and the database on Neon. |
| 25 | |
| 26 | ## Choose a client |
| 27 | |
| 28 | | Engine | Typed schema queries | Raw SQL | |
| 29 | | --- | --- | --- | |
| 30 | | Postgres | [Drizzle.Postgres](/sql/drizzle/postgres) · [Prisma ORM](/sql/prisma/postgres) | [SQL.Postgres](/sql/effect-sql/postgres) | |
| 31 | | MySQL | [Drizzle.MySQL](/sql/drizzle/mysql) | [SQL.MySQL](/sql/effect-sql/mysql) | |
| 32 | | D1 | [Drizzle.D1](/sql/drizzle/d1) | [SQL.D1](/sql/effect-sql/d1) | |
| 33 | | Durable Objects | [Drizzle.DurableObject](/sql/drizzle/migrations#durable-object-migrations) | [Instance SQL](/sql/effect-sql/migrations#durable-object-migrations) | |
| 34 | |
| 35 | Prisma ORM v8 requires PostgreSQL 17+. Aurora DSQL has its [own authentication and SQL constraints](/aws/data/drizzle-dsql); Postgres wire compatibility does not establish Prisma support or support for every PostgreSQL feature. |
| 36 | |
| 37 | ## Commit migration files |
| 38 | |
| 39 | ```sh |
| 40 | pnpm exec drizzle-kit generate |
| 41 | git add src/schema.ts drizzle.config.ts drizzle |
| 42 | git diff --cached |
| 43 | git commit -m "Add schema migration" |
| 44 | ``` |
| 45 | |
| 46 | This example uses `out: "./drizzle"`; use the output directory configured by your generator and apply committed SQL through the selected database's migration workflow. Private databases require a runner with network access. |
| 47 | |
| 48 | [Drizzle migrations](/sql/drizzle/migrations) · [Handwritten SQL](/sql/effect-sql/migrations) · [Prisma contracts](/sql/prisma/migrations) · [Runtime integration guides](/sql#find-an-integration) |