3 ms·
This makes sense. The models in rails do all the heavy lifting. Unfortunately all too often the developers aren't aware of the abuse they are putting the DB thr
by richardlblair 15y ago
This makes sense. The models in rails do all the heavy lifting. Unfortunately all too often the developers aren't aware of the abuse they are putting the DB through.
Personally I use Django. When it comes time for me to perform a query that might require multiple inner joins, a group by, and aggregates I will often write the query by hand. This allows me to figure out the requirements of the query. From there I figure out how to accomplish that with the ORM.
I think more people should take this approach. It would help people understand what it is they are doing with the database.
EDIT: That being said, having an ORM do exactly what you want can be like pulling teeth sometimes. I must say, I'm not fully sold on the ORM.
- meepmorp 15y agoLike any tool, ORMs are appropriate for some uses, and not for others. In the Python world, I like SQLAlchemy. It performs well, it's fairly well documented (improving, though I've had to read source code to figure out options before), and it's not tied to a web framework, the way I believe Django's is.
- jacques_chester 15y agoThe description I give is that rails programmers think of databases as files with a funny accent. The classic CF in rails is a form that ultimately deals with > 1 table. Multi-table forms are a pain for everyone, but with a bit of database juju you could disguise the complexity with, say, an updateable view.