HACKER Q&A
📣 bagadurshah

I'm Confused about using ORM with Front end Frameworks


Coming From .NET Core Background, I'm beginner for Javascript Frameworks. I just wanted to know whether to use SQL Server as my database to back my Next.js Project or Can I use any of the existing ORM Services that are provided such as Prisma or Supabase or something?. If so, which is the most widely used ORM for Javascript Frameworks? Help me here please :)

Thanks


  👤 smrth Accepted Answer ✓
SQL Server should do just fine. I use Vitess (MySQL hosted on PlanetScale) with Prisma for my Next app, https://debate.land. It works just fine with scale, but I have found myself turning to writing some raw SQL queries to optimize performance/run some nuanced aggregations that Prisma doesn't seem to have a way to handle. If I had to do it again, I'd probably use https://drizle.team. Seems to be a more performant ORM. But for getting started, either will suffice.

👤 jo_beef
I rarely see SQL Server being used alongside Next.js. But Prisma is quite popular in js land. There's also DrizzleORM, which is still relatively new. I'd recommend spending some time exploring both to see what fits you best :)

https://orm.drizzle.team/docs/quick-start

https://www.prisma.io/docs/getting-started/quickstart


👤 RadiozRadioz
You can definitely use SQL Server for your JS project, but do note that the general web "culture" is different to .NET's. Most people here are running Open Source stuff like PostgreSQL and MySQL, you're likely to find guides assuming as much. In JS specifically, NoSQL tools like MongoDB are popular and good if they align with your use case.

Side note: this feels more like a Stack Overflow question than an Ask HN post.