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