There are multiple tradeoffs at play. Most businesses would benefit from the early wins of an ORM. Portability is nice but pretty rare to swap databases. A common strategy is to define stored procedures for read queries because ORM generated select statements are not performant. Its probably more important who is going to maintain the software in the long run. If the app becomes popular enough database performance becomes critical but most apps are not popular enough to require this from the start.
Using an ORM or plain SQL?
For some of the apps I've developed (then proceeded to forget about), I've been writing plain SQL, primarily for MySQL. Though I have used ORMs in python like [SQLAlchemy](http://www.sqlalchemy.org/), I didn't stick with them for long. Usually it was either the documentation or complexity (from my point of view) holding me back.I see it like this: use an ORM for portability, plain SQL if it's just going to be using one type of database. I'm really looking for advice on when to use an ORM or SQL when developing an app that needs database support.Thinking about it, it would be far better to just use a lightweight wrapper to handle database inconsistencies vs. using an ORM.
Follow
1
Add comment
More
Report
1 Expert Answer
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.