what orm should I use to build erp with nextjs ?
Answered
Scaly-naped Pigeon posted this in #help-forum
Scaly-naped PigeonOP
I was searching and wanted to know how can I choose my backend orm ( postgresql ) i mainly using prisma but i heard that its slow on big data compared to supabase or drizzle but drizzle is not dev friendly but both supabase and drizzle supports real time functionality i am now confused since i need real time functionality for chat and products on my erp system so which one to choose should I use drizzle or supabase in your experience ?
Answered by Roseate Spoonbill
I'd say start with one, keep it simple and then add more as you need. If real-time features are core of the system and important, skip drizzle for now. Focus on making it easy to work with, especially if you're expecting the system to get big. It's hard to keep it easy to develop while you're mixing two db access layers together - each will have it's own config, caches, schema description etc. If you start with one, you might end up never reaching for another, because it will always perform as expected.
11 Replies
Roseate Spoonbill
I don't think Drizzle inherently supports real-time data. Neither does PostgreSQL. Normally there are bunch of services that are built around PostgreSQL to add support for real-time data. I'd look towards Convex for such setup, since they are built around it, and you can host convex on your own as it is open source.
Supabase is ofc also valid solution, probably still much more popular than Convex.
@Roseate Spoonbill I don't think Drizzle inherently supports real-time data. Neither does PostgreSQL. Normally there are bunch of services that are built around PostgreSQL to add support for real-time data. I'd look towards Convex for such setup, since they are built around it, and you can host convex on your own as it is open source.
Scaly-naped PigeonOP
I see but do u think that supabase is faster than drizzle or they have the same performance
@American Sable do not abbreviate “ERP” 😭
Scaly-naped PigeonOP
It's just for the title because it's too long 😁
Roseate Spoonbill
Supabase is much more than drizzle - it's a whole platform for backend services, while drizzle is ORM. It's really hard to compare them.
In many cases Supabase (and convex) will be considered slower, as it is whole system (not just database), while drizzle allows you to build nearly raw db queries.
However, supabase and convex are built with real-time in mind, meaning you'd probably end up with data on client side faster than when building your own sync layer on top of drizzle. So raw query speed might be faster with drizzle, while the overall db-to-client might be slower unless you build your sync layer really well.
In many cases Supabase (and convex) will be considered slower, as it is whole system (not just database), while drizzle allows you to build nearly raw db queries.
However, supabase and convex are built with real-time in mind, meaning you'd probably end up with data on client side faster than when building your own sync layer on top of drizzle. So raw query speed might be faster with drizzle, while the overall db-to-client might be slower unless you build your sync layer really well.
@Roseate Spoonbill Supabase is much more than drizzle - it's a whole platform for backend services, while drizzle is ORM. It's really hard to compare them.
In many cases Supabase (and convex) will be considered slower, as it is whole system (not just database), while drizzle allows you to build nearly raw db queries.
However, supabase and convex are built with real-time in mind, meaning you'd probably end up with data on client side faster than when building your own sync layer on top of drizzle. So raw query speed might be faster with drizzle, while the overall db-to-client might be slower unless you build your sync layer really well.
Scaly-naped PigeonOP
I see I heard also about using drizzle with supabase js for real time , which drizzle handles queries and supabase handles real time , do u think that will be best option to build big systems ?
Roseate Spoonbill
I'd say start with one, keep it simple and then add more as you need. If real-time features are core of the system and important, skip drizzle for now. Focus on making it easy to work with, especially if you're expecting the system to get big. It's hard to keep it easy to develop while you're mixing two db access layers together - each will have it's own config, caches, schema description etc. If you start with one, you might end up never reaching for another, because it will always perform as expected.
Answer
@Roseate Spoonbill I'd say start with one, keep it simple and then add more as you need. If real-time features are core of the system and important, skip drizzle for now. Focus on making it easy to work with, especially if you're expecting the system to get big. It's hard to keep it easy to develop while you're mixing two db access layers together - each will have it's own config, caches, schema description etc. If you start with one, you might end up never reaching for another, because it will always perform as expected.
Scaly-naped PigeonOP
Yeah that is correct will start with convex or supabase and if they get slow I will try drizzle in the future
Thank you for the help @Roseate Spoonbill 🤗
Roseate Spoonbill
You're welcome and good luck with your build!