Skip to content
TypeScript
3.5 KB
Raw Blame
---
title: Databases
description: Compare database engines, connection paths, and deployment guides across Alchemy's SQL providers.
---

Choose the database independently from the application runtime where supported. For example, a Cloudflare Worker or Hetzner application can both use Neon Postgres.

## Choose a database

| Database | Engine | Connection path | Setup |
| --- | --- | --- | --- |
| AWS RDS / Aurora | Postgres or MySQL | VPC connection; Data API on supported configurations | [RDS & Aurora](/aws/data/rds) · [Aurora + Drizzle](/aws/data/drizzle-aurora) |
| Aurora DSQL | Distributed SQL with Postgres wire compatibility | IAM-authenticated connection | [DSQL + Drizzle](/aws/data/drizzle-dsql) |
| Cloudflare D1 | SQLite | Native Worker binding | [D1 + Drizzle](/cloudflare/data/d1-drizzle) |
| Durable Object storage | SQLite per named object | Instance storage | [Durable Objects](/cloudflare/compute/durable-objects#sql-migrations) |
| Fly Managed Postgres | Postgres | Private connection from a Fly Service | [Managed Postgres](/fly/data/postgres) |
| Neon | Postgres | Direct or pooled URL; Hyperdrive from Workers | [Neon branches](/neon/data/branching) · [Connections](/neon/data/connections) |
| PlanetScale Postgres | Postgres | Role connection URL; Hyperdrive from Workers | [PlanetScale Postgres](/planetscale/data/postgres) |
| PlanetScale Vitess | MySQL | Password connection URL; Hyperdrive from Workers | [PlanetScale MySQL](/planetscale/data/mysql) |
| Prisma Postgres | Postgres | Database connection URL | [Prisma Postgres](/prisma/data/postgres) |
| Railway Postgres | Postgres | Private service URL or public TCP proxy | [Railway Postgres](/railway/data/postgres) |
| Railway MySQL | MySQL | Private service URL or public TCP proxy | [Railway MySQL](/railway/data/mysql) |
| Turso | SQLite (libSQL) | libSQL URL and token | [Turso databases](/turso/databases) · [Connections](/turso/connections) |

[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.

## Choose a client

| Engine | Typed schema queries | Raw SQL |
| --- | --- | --- |
| Postgres | [Drizzle.Postgres](/sql/drizzle/postgres) · [Prisma ORM](/sql/prisma/postgres) | [SQL.Postgres](/sql/effect-sql/postgres) |
| MySQL | [Drizzle.MySQL](/sql/drizzle/mysql) | [SQL.MySQL](/sql/effect-sql/mysql) |
| D1 | [Drizzle.D1](/sql/drizzle/d1) | [SQL.D1](/sql/effect-sql/d1) |
| libSQL (Turso) | [Drizzle.LibSQL](/sql/drizzle/libsql) | [SQL.LibSQL](/sql/effect-sql/libsql) |
| Durable Objects | [Drizzle.DurableObject](/sql/drizzle/migrations#durable-object-migrations) | [Instance SQL](/sql/effect-sql/migrations#durable-object-migrations) |

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.

## Commit migration files

```sh
pnpm exec drizzle-kit generate
git add src/schema.ts drizzle.config.ts drizzle
git diff --cached
git commit -m "Add schema migration"
```

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.

[Drizzle migrations](/sql/drizzle/migrations) · [Handwritten SQL](/sql/effect-sql/migrations) · [Prisma contracts](/sql/prisma/migrations) · [Runtime integration guides](/sql#find-an-integration)