3 ms·
Not discounting the monumental work that SQLAlchemy was to create. It’s a complicated set of machinery that allows one to plug in any relational backend and the
by gigatexal 7y ago
Not discounting the monumental work that SQLAlchemy was to create. It’s a complicated set of machinery that allows one to plug in any relational backend and then just define models and go and if your way of thinking fits ORMs and sessions and you want to use lazy loading etc it’s great. Personally I would rather couple my code to my database a bit more and go the route of raw SQL in code or stored procedures on the database that then acts as an abstraction that my code can call into.
I’ve worked at places that have taken both approaches and each has advantages and disadvantages but I would take writing my query over an ORM any day. I am just too paranoid too leave any performance on the table and don’t want the cognitive overhead of an ORM getting in the way of my queries. That being said SQLAlchemy is pretty awesome when used as a query builder — I think that’s a good compromise if you must use an ORM and it is SQLAlchemy then I’d use it like that.