Andrei0872 / decentdebates

A place where all sorts of topics are debated in a respectful and constructive manner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why I decided not to use an ORM

Andrei0872 opened this issue · comments

Personal conclusions:

  • I really like writing SQL and make use of the database-specific features
  • I don't think it's possible to reach a very good level of abstraction when the project's complexity increases
  • you have to keep the ORM definitions in sync with the underlying database schema(3))
  • fewer moving parts that you need to worry about(4))
  • an abstraction is less likely to be as flexible and as performant as the native querying language(4))
  • (5)) > ORMs often generate complicated queries for relatively simple database operations, because they employ general patterns that must be flexible enough to handle other cases
  • transactions are very important(6))

References:

  1. https://dev.to/harshhhdev/why-orms-arent-always-a-great-idea-41kg
  2. https://youtu.be/nIyToKVh44s
  3. https://www.edgedb.com/blog/a-solution-to-the-sql-vs-orm-dilemma
  4. https://www.prisma.io/dataguide/types/relational/comparing-sql-query-builders-and-orms
  5. https://www.prisma.io/dataguide/types/relational/comparing-sql-query-builders-and-orms#drawbacks-of-orms
  6. https://levelup.gitconnected.com/raw-sql-vs-query-builder-vs-orm-eee72dbdd275
  7. https://calpaterson.com/activerecord.html