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.

📉 Falling 0.4x Databases
7,400
Comments
20
Years Active
5
Top Authors
#6387
Topic ID

Activity Over Time

2007
19
2008
25
2009
109
2010
134
2011
310
2012
286
2013
281
2014
319
2015
201
2016
365
2017
553
2018
440
2019
783
2020
435
2021
740
2022
431
2023
911
2024
559
2025
494
2026
5

Keywords

e.g redbeanphp.com JPA OO SQL OrmHate.html ORM DAL ayende.com AFAIK orm sql orms database raw relational queries code write people don know

Sample Comments

vladsanchez Jun 25, 2017 View on HN

ORMs are for people who don't know SQL.

walshemj Apr 23, 2018 View on HN

Don't use an ORM is the answer just put in the effort to lean SQL

tester756 Jul 26, 2021 View on HN

People don't use ORMs there?Those are great tools and you can always use raw sql in exceptional cases

kamyarg Dec 18, 2017 View on HN

an ORM does not have to solve every single problem you have, write your raw sql and run it.

coldtea May 8, 2013 View on HN

No. But an ORM is training wheels on SQL.

Hendrikto Nov 6, 2025 View on HN

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.

rmdashrfroot Oct 3, 2018 View on HN

He's advocating using ORMs rather than writing raw SQL queries

Tiquor May 2, 2016 View on HN

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.

babelfish Jun 28, 2023 View on HN

What’s the point of ORM code if you already have optimal SQL?

hota_mazi Dec 18, 2017 View on HN

What ORM's have taught me: be comfortable with both SQL and at least one ORM, and use each appropriately.