(Some) ORM haters do get it
11–20 of 108 posts
Re: (Some) ORM haters do get it
#12ORMs are powerful, because they let you say less and do more. For 90% of the queries out there, an ORM is fine.
SQL is powerful, because you can control and fine-tune your statements. For the remaining 10%, use SQL.
Are ORMs bad? No. Can you them for everything? No.
The same thing can be said for almost every technology in existence.
Re: (Some) ORM haters do get it
#13Can anyone point out the coup de grâce the author seems to think he has arrived at? He points out some (well known) ways that ORM's can be used inneficiently, and acknowledges the techniques that have been developed to work around these, but then seems to conclude that he has proven once and for all that ORM's are bad. I totally missed the connection on that part. Is it that SQL is better in dealing with sets than an…
The connection (according to the author as far as I've understood him) is: "All the techniques that have been developed to work around the inefficiencies of ORMs are just reinventing the wheel. The solutions have been there for 40 years and your workarounds are only needed because you think about individuals (object-orientied) instead of sets (relational)."
What if it's better structurally for the program as a whole to think about individuals?
Re: (Some) ORM haters do get it
#14But this article is a breath of fresh air. I may just try Dapper for the next project
Re: (Some) ORM haters do get it
#15Earlier quoted context omitted.
Batch updates aren't where it ends. As a Django developer with a strong SQL background I find my hands are tied far more often than I would like. Sometimes this is caused by bugs like the current group by bug[1], other times it's caused by the design of the ORM. I do agree that the ORM is handy for things like "Get me all the things in this table", and "update this single record using a form", but this author is dead…
Django's ORM is a piece of junk compared to a proper one such as SQLalchemy, hibernate or nhibernate. I wouldn't go drawing conclusions until you've experienced something else.
Re: (Some) ORM haters do get it
#16i.e. if you have to write your code in a specific way to make the ORM behave correctly (constantly thinking about what kind of sql your code is generating), then the abstraction becomes a lot less useful.
Re: (Some) ORM haters do get it
#17Earlier quoted context omitted.
Batch updates aren't where it ends. As a Django developer with a strong SQL background I find my hands are tied far more often than I would like. Sometimes this is caused by bugs like the current group by bug[1], other times it's caused by the design of the ORM. I do agree that the ORM is handy for things like "Get me all the things in this table", and "update this single record using a form", but this author is dead…
Django's ORM is a piece of junk compared to a proper one such as SQLalchemy, hibernate or nhibernate. I wouldn't go drawing conclusions until you've experienced something else.
Sure, if you're doing a simple CMS, a simple system (even with Django Auth), Django ORM is fine
If you have anything slightly complex (several relationships between models) watch it fall apart
Re: (Some) ORM haters do get it
#18Getting single row by primary key which is 90% of access is overly verbose in SQL so ORM wins.
For slightly more complicated cases SQL is much faster and easy to write so people who have to increment field in all rows that satisfy simple condition go: "ORM sucks".
But for more complicated cases like trimming data tree in some places SQL quickly becomes too much of a puzzle for most programmers to deal with so they prefer ORM again because it's doable there and most of the times works. Dedicated SQL users who are not good at puzzles in such cases write full fledged program (if their SQL dialect allows for that) and instead of bringing data to their iterative or recursive programs they bring their programs to the data which creates hard to debug, unreadable often unversionable monstrosities.
There should be some merge between databases and programming languages that could combine beauty of syntax of modern programming languages and efficiency of massive data handling of modern databases.
Why is it ok to have standard hashmap implementation in a language but not file backed hashmap or btree index?
Re: (Some) ORM haters do get it
#19These days, we have languages which integrate rather nicely into the declarative mindset, so no need anymore for such bizarre "paradigm translators".
Re: (Some) ORM haters do get it
#20This article is very much to the point. ORMs use the wrong abstractions. They try to 'map' 4GL to 3GL. The results are necessarily unsatisfactory.