2 ms·
Not speaking negatively about the author of this post, but union should have been the obvious tool to use in a scenario like this. SQL is very powerful and rea
by blunte 6y ago
Not speaking negatively about the author of this post, but union should have been the obvious tool to use in a scenario like this.
SQL is very powerful and really not so complicated. Schema, index, and constraint design can be quite challenging, depending on the needs, but that's true whether using SQL or an ORM.
The problem I see often is that people use ORMs and never learn SQL. Also often, one has to really work to understand how their ORM is handling certain situation to avoid problems like N+1 or cartesian products.
In the end, it seems that rather than learning SQL, the developer ends up learning just as much or more about a specific ORM to get the same quality/performing results they would have gotten by using direct SQL.