MHN

Ask HN: Raw SQL vs. ORM?

38 points by CodinM·3155 days ago·Show in HN

What's your opinion/experience on using raw SQL queries vs using an ORM for interfacing with an SQL DB?

Add a comment on Hacker News →
1 of 76 comments
  1. Raw SQL queries will perform fast if you write correctly. No ORM will stand close. Stored procedures help a lot. It's close to C/C++ in a sense that is easy to shoot yourself in the foot.

    On other hand, ORM helps to write code that can be unit tested and you can test that some data retrieval conforms to certain principles.