3 ms·
SQLAlchemy uses the data mapper pattern whereas django ORM uses active record - that's the main difference. Neither one is really 'better', there are advantages
by crdoconnor 12y ago
SQLAlchemy uses the data mapper pattern whereas django ORM uses active record - that's the main difference. Neither one is really 'better', there are advantages to both approaches:
http://russellscottwalker.blogspot.sg/2013/10/active-record-vs-data-mapper.html http://russellscottwalker.blogspot.sg/2013/10/active-record-...
The main advantage to django ORM in my opinion is 'less code', although it does create an excessive coupling between your persistence / model layer. Whether that is something you can live with or not is up to your project's requirements.
I'm pretty happy to work with both. Just don't make me use RoR!