ORMs vs Raw SQL
This cluster centers on the debate between using Object-Relational Mappers (ORMs) and writing raw SQL queries, with commenters arguing ORMs are unnecessary for SQL-proficient developers while others defend them for simplicity in common cases or advocate hybrid approaches.
Activity Over Time
Top Contributors
Keywords
Sample Comments
ORMs are for people who don't know SQL.
Don't use an ORM is the answer just put in the effort to lean SQL
People don't use ORMs there?Those are great tools and you can always use raw sql in exceptional cases
an ORM does not have to solve every single problem you have, write your raw sql and run it.
No. But an ORM is training wheels on SQL.
You don’t need an ORM either. It’s just another level of complexity for very little to no gain in almost all cases. Just write SQL.
He's advocating using ORMs rather than writing raw SQL queries
Every widely used ORM allows direct SQL. Like many other things knowing when and where to use it is key. An ORM will be great for 90% of an app. When it is not a good fit, go direct to the DB/datastore. The point of enlightenment is not rejection of the ORM but rejection of the idea that the ORM is good for everything.
What’s the point of ORM code if you already have optimal SQL?
What ORM's have taught me: be comfortable with both SQL and at least one ORM, and use each appropriately.