Re:Your database skills are not 'good to have'
by cameronh90 on Monday April 01, 2024 @11:12AM
(#39894977)
I'm a big fan of SQLAlchemy. While not without its quirks, it lets you write relational-style queries, but in native Python, and automatically maps the result sets to objects. If you have N+1 issues with SQLAlchemy, you probably would have had them with your own custom-written SQL queries also.
Re:Your database skills are not 'good to have'
by cogman10 on Monday April 01, 2024 @11:21AM
(#39895087)
Yeah, this is why I generally just don't like ORMs. They often just leaky abstractions where you end up not only needing to know how the ORM works, but also SQL when you need to go back and fix the ORM.
There are exceptions, like jooq, which try not to really be an ORM and instead are just a language extension to help write sql (funnily, being an even more leaky abstraction is preferable here :D)
Re:Your database skills are not 'good to have'
by west0n on Monday April 01, 2024 @11:15AM
(#39895018)
so I leaved Rails, lol
Re:Your database skills are not 'good to have'
by corytheboyd on Monday April 01, 2024 @02:06PM
(#39897128)
Don’t blame you!
I’ve never seen it in the wild, so I get the blanket ban. In theory though you COULD contain ORM usage behind an intentional data access interface.
I can only really speak for Rails from my own experience, but it most certainly tries exactly 0% to get you to care about this problem. It encourages deeply nested, at all layers of abstraction, through class inheritance and all that garbage, unrestricted access to the database through a very powerful ORM.
You end up tuning performance of queries that end up changing in a month because of this. It’s wild.