News for hackers. Stuff that matters.
Re:ORM Haters Don't Get It by lucian1900 on Thursday May 10, 2012 @05:45AM (#3952591)
The concept of ORM isn't necessarily bad, it's just that most ORMs are terrible and try to map too much of relational algebra to objects, even if it is a bad fit.

Good ORMs like SQLAlchemy first model a relational database and then build the object bits on top of that. That's why you can do an explicit outer join between models so you end up making a constant number of queries (instead of n queries with the naive attribute fetch in a loop).

One almost never has to write SQL when using SQLAlchemy, as opposed to, for example, Django's ORM, which has a much more "mainstream" design. SQLAlchemy is more like a relational/SQL library + an optional ORM-like thing.

There are no comments on this comment yet.