I'm kicking off a new project using TypeScript and I want to hear about others' experiences with different Object-Relational Mappers (ORMs) in the TypeScript/JavaScript ecosystem. I come from a C# background and have thoroughly enjoyed using Entity Framework Core. TypeORM seems to be the closest equivalent I've found so far, but I'm curious if anyone has tried it or has experience with other ORMs like Prisma or Drizzle. My SQL skills are basic, so I'm hoping for something that's user-friendly. What do you recommend?
5 Answers
Honestly, Drizzle has been great for me. I find TypeORM a bit bloated and I personally don't like its object-oriented approach with TypeScript. Since you mentioned your C# background, you might actually find TypeORM familiar, but I think Kysely could also be a magical choice if you prefer more of a query-builder style.
Drizzle is a solid option! I think it's pretty good overall. But just to let you know, it might require some SQL knowledge to fully utilize its capabilities. If you're not comfortable with SQL, you might want to weigh your options carefully.
This is the correct answer.
Drizzle is definitely my favorite! Just keep in mind that integrating it with NestJS can be a bit tricky. However, they're improving the ORM query syntax in the upcoming 1.0.0 release, which should make it more user-friendly for those uncomfortable with SQL.
What makes it difficult to integrate?
I’ve used Sequelize in the past and I liked it during my projects. Initially, it felt intuitive, but when it comes to more complex queries, it gets a bit challenging because of some odd syntax that isn't documented well.
Interesting, one of the reasons I wasn't looking into it was I had heard it didn't have good TypeScript support? Did you manage typing in your project?
Sequelize seems great when you're starting, but it gets tricky when you need complex functionalities.
I have experience with both TypeORM and Prisma. They’re pretty easy to pick up, especially if you're used to Entity Framework. If I had to choose, I’d say they both have their strengths, but it really comes down to what fits your needs better.
Which of the two did you have a better experience with?

Do you have to know SQL well to use it?