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

What are some good rule-of-thumbs for when to use ORM vs SQL?

I have worked with SQLAlchemy and Entity Framework, before and like them, but haven’t been able to find that magical demarcation line for when to go raw SQL.

Does anyone have basic rules they use for determining this? Applicable to MVP or enterprise level products



The more joins or when you need more performance, drop into SQL.

SQLAlchemy's expression language is a good middle ground. I will start there if I need to do more than a couple of joins.

As some people have noted here, I think the biggest problem is that people who only know ORMs will have trouble because their understanding of the database will be limited by their lack of SQL knowledge.




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

Search: