loading...

Should i use an ORM? When to use it? Which one?

twitter logo ・1 min read

Hey everyone,

i am currently working on a private project to get my nodejs skills a bit developed. I am trying to create an api with express and use a postgres db to store data. Nothing fancy here, just creating some users and stuff.
My question is: Should i use an ORM? Sure for that small case queries will do the work for me but what about more complex projects with bigger sets of data? I don't want to start a discussion or something just get a hint.

Thanks a lot

twitter logo DISCUSS (1)
markdown guide
 

I don't no a thing about nodejs, but here would be my framework to answer this question:

  • Do you have short term goals?
  • Is there one NodeJS CRM that is way more popular than all the others?

If you answer yes to those two questions, do use that CRM, you will get started faster.

If not, I would go for SQL, because knowing one CRM is fine, but after switching to 5-10 different CRMs, you start to wonder whether your time would not have been better invested into learning SQL, the lingua franca of relational database.

My favorite approach in the Kotlin world, is to embrace SQL but make it typesafe

github.com/cashapp/sqldelight
github.com/JetBrains/Exposed

Classic DEV Post from Mar 29 '19

Code of Conduct generator!

Hrn Svncハルン Харун Севиндж profile image
Java and js developer from germany.I do web stuff. I like to try out new stuff und learn new things.