Managed Postgres (Neon, RDS)
The most trusted SQL database, run and backed up by someone else.
Pick it when Your data has relationships, such as users, orders and items, and you want a safe default.
Skip it if Your data has no clear shape and changes every week, and you want zero planning.
- Strong rules keep your data correct
- Huge ecosystem, and your skills carry over to any host
- Easy to move between providers
- You must design tables and run migrations
- Too many connections from serverless can overload it
- Quick to set up
- Cheap while small
- Easy to leave
- Room to grow
PriceFree tier on some hosts, then by size and use
How to connect it
- Create a database in the provider's dashboard and copy the connection string.
- Put it in your environment as DATABASE_URL.
- Create a table with a migration, not by hand in production.
- Use a pooled connection string when your app runs on serverless.
DATABASE_URL
import { neon } from "@neondatabase/serverless";
const sql = neon(process.env.DATABASE_URL!);
export async function notesFor(userId: string) {
return sql`select id, title from notes where user_id = ${userId}`;
}