What ORMs have taught me: just learn SQL (2014)
1–10 of 654 posts
Re: What ORMs have taught me: just learn SQL (2014)
#2Re: What ORMs have taught me: just learn SQL (2014)
#3Re: What ORMs have taught me: just learn SQL (2014)
#4Re: What ORMs have taught me: just learn SQL (2014)
#5Re: What ORMs have taught me: just learn SQL (2014)
#6https://javarants.com/generate-jpa-or-gorm-classes-from-your...
Re: What ORMs have taught me: just learn SQL (2014)
#7Wholeheartedly agree. It's amazing how much work you can save by just having the database do it via a SQL query/view.
I think it's easier to learn SQL than learn an abstraction of a DSL.
Re: What ORMs have taught me: just learn SQL (2014)
#8When doing work in python, I don't feel it has a comparable ORM, to where I kind of write my own files that have things like finders and updaters and creators. In most cases, I've found it's much better than SQLAlchemy. Dealing with joins, and things like math, meaning averages, sums, distributions, division, is so much better to be done in the query rather than more basic queries and looping through the results.
There are of course cases like injections to look at, but lots of things I have are calculations of data and showing it, so we're able to handle it with raw queries. Also, ActiveRecord has ways to enforce no injections.
In lots of cases, we've found that using an ORM to start, finding slowness, and moving towards raw queries is a great way to go.
Re: What ORMs have taught me: just learn SQL (2014)
#9The first item about querying is relevant but all ORMs allow you to drop into SQL to execute a complex reporting-style query. It's not really necessary if you are just querying in objects to manipulate (which is what ORMs are good for).
Re: What ORMs have taught me: just learn SQL (2014)
#10Databases think in tables and columns and rows and queries and indexes.
If you don't pick an ORM to help manage this translation layer, then you'll end up re-implementing your own. Maybe this is OK, because yours will be simpler for quite some time.
What else are you going to do? Stored procedures? Concatenated strings?