How do you approach database access in Node.js projects ?
Hey everyone 👋
I’m curious how different developers approach database access in Node.js applications, especially when working with PostgreSQL.
There seem to be a few common patterns:
* Using an ORM like Prisma * Using a query builder like Knex or Drizzle * Writing raw SQL with something like pg
Rather than asking “which is best,” I’m more interested in how people *think about this choice* in real projects.
For those with production experience:
* What approach do you personally prefer, and what led you to that choice? * How has your opinion changed over time as your projects scaled? * Have you run into any unexpected issues (performance, debugging, migrations, etc.) with your approach? * Do you prioritize developer experience or control when making this decision?
I’d love to hear different perspectives and trade-offs people have seen in real-world use.