Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The big question is when to use ORMs/raw SQL.

SQL is the most concise and perfect fit for RDBMS.

However, at the application level there are benefits of using ORM.

- The application itself is usually imperative style as against the declarative nature of SQL.

- Chaining is sometimes more readable and concise. One can chain dynamic filters.

- Abstract the underlying data model with higher level names. SQL eq. of table views.

- Hides the underlying relational model. Which can sometimes be helpful in a large code base. And sometimes a curse.

I normally opt for ORM in Rails/Django web apps. But SQL in

- Performance critical - Report generation, where it might be complex and declarative nature of SQL shines.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: