Skip to main content
If you want PostgreSQL in a Next.js app on DBHost, the first decision is not the host. It is the data layer. The shortest useful split is:
  • Prisma if you want a full ORM and the fastest path to application models
  • Drizzle if you want SQL-shaped TypeScript with less abstraction
  • pg if you want a plain PostgreSQL client and no ORM at all
DBHost fits all three the same way: create a database, copy the pooled connection string, keep queries on the server, and let DBHost handle pooling, backups, and credentials.

Which path fits your app

pg is the most direct end-to-end path: it works with the pooled runtime connection, and an owner SQL client can create the example table. Prisma Client and Drizzle use the same pooled connection for app queries; run their schema tools over the direct migration connection. Drizzle is the clearest alternative for teams that want SQL ownership without dropping type safety. Plain pg suits teams that do not want an ORM, and also cron jobs, route handlers, and internal tools that just need SQL.

DBHost-specific fit

All three paths use the same DBHost building blocks:
  • one PostgreSQL database
  • one pooled connection string on port 6432 with verify-full TLS
  • separate owner and runtime roles when you choose managed SQL roles
  • one place to manage passwords and backups
  • one dashboard on every plan, with CLI and API automation on Pro and Business
The library changes. The platform path stays the same.

Guides

Prisma

Use Prisma Client for runtime queries after the schema is created through an approved owner path.

Drizzle

Use Drizzle when you want a lighter SQL-first TypeScript workflow.

pg

Use node-postgres when you want direct SQL without an ORM layer.

Next steps

  • Start with the guide that matches your current stack preferences.
  • Keep database queries in Server Components, route handlers, or server actions.
  • Use a pooled URL for app queries. Keep schema-changing credentials and migration tooling separate from the runtime role, and run migrations over the direct migration connection.