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.
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.