Earlier quoted context omitted.
One problem with having logic in the DB is that it's much harder to scale if you need 10x more computing power.
Moving the definition of your sql from your app to the database doesn't impact scalability, as in both cases the database needs to perform the query.
What ORMs have taught me: just learn SQL (2014)
131–140 of 360 posts
Re: What ORMs have taught me: just learn SQL (2014)
#132Re: What ORMs have taught me: just learn SQL (2014)
#133I think saying "Just use SQL" is probably a bad idea. You'll most likely end up implementing an ORM anyway, or you will end up with your model code mixed up everywhere with your views. I do think a lot of people use ORMs as a crutch, which sucks. Also, ORMs often provide too much abstraction, forcing people who actually know SQL to relearn how to do everything the way the ORM happens to like it. I should not have to…
No need for ORM, and no inline sql logic in your application code.
Re: What ORMs have taught me: just learn SQL (2014)
#134Re: What ORMs have taught me: just learn SQL (2014)
#135The first time I've seen an ORM I was fascinated by this seemingly beautiful idea. But I have quickly realized that it's almost useless in real life projects, plain old SQL seems just much much better. Now I don't understand why would anybody use an ORM actually. Also, basic SQL can be easily taught in as little as 10 minutes (I have been initially taught it at middle school during MS Office Query, Access and VBA cla…
there are plenty of real life projects out there that would beg to differ
Re: What ORMs have taught me: just learn SQL (2014)
#136Some people, when faced with a database problem, choose to use an ORM on top of an RDBMS. Those people now have three problems. The problems are: the original problem, the expressive and performance disaster that is every ORM ever, and the layered and hidden RDBMS whose peculiarities nonetheless always find a way to leak through the ORM abstraction. Fun stuff. Do what TFA says: just learn SQL.
The real question is, why anyone using an ORM not learning SQL, how the the thing they are mapping to objects actually works?
Re: What ORMs have taught me: just learn SQL (2014)
#137Why are we even having this debate? There are some ORMs that bring so much value to the table that you'd be stupid not to use them. Example being Django's ORM or SqlAlchemy. Also be specific in what ORM you are comparing to raw SQL. Are you talking about Hibernate or SQLAlchemy. Are you talking about a query builder? Good ORMs help tremendously with maintainability and security. They also let you drop down to raw SQL…
ORMs seems nice for simplified problems but becomes a horrible mess for real problems imho...
I've worked on some rails apps, and the ORMs caused more problems than they solved...
Re: What ORMs have taught me: just learn SQL (2014)
#138> If you're using an RDBMS, bite the bullet and learn SQL. If this person spent all that time using Hibernate and then SQLAlchemy, and all that time did not know SQL, then their suffering and bad experiences make complete sense. You absolutely need to know SQL if you're going to use an ORM effectively. Good ORMs are there to automate the repetitive tasks of composing largely boilerplate DML statements, facilitating q…
"Attribute creep and excessive use of foreign keys shows me is that in order to use ORMs effectively, you still need to know SQL. My contention with ORMs is that, if you need to know SQL, just use SQL since it prevents the need to know how non-SQL gets translated to SQL."
Re: What ORMs have taught me: just learn SQL (2014)
#139> If you're using an RDBMS, bite the bullet and learn SQL. If this person spent all that time using Hibernate and then SQLAlchemy, and all that time did not know SQL, then their suffering and bad experiences make complete sense. You absolutely need to know SQL if you're going to use an ORM effectively. Good ORMs are there to automate the repetitive tasks of composing largely boilerplate DML statements, facilitating q…
That is quite theoretical. My PRs for fixing non-spec compliant behavior in pgjdbc get rejected because they might break some ORMs (mostly Play). My PRs for adding MariaDB sequence support to Hibernate get rejected because there are additional MariaDB features that Hibernate doesn't support as well.