4 ms·
SQL is much more powerful than most people think, and taking an afternoon to learn everything you can do with it is a great investment. After you do that, you
by lovasoa 3y ago
SQL is much more powerful than most people think, and taking an afternoon to learn everything you can do with it is a great investment.
After you do that, you will probably not WANT an ORM anymore, finding that it makes your code less readable than plain sql, not simpler.
Actually, you'll even realize that you may not need anything BUT sql to write your application, using something like (shameless plug) SQLPage [1]
[1] https://sql.ophir.dev https://sql.ophir.dev
- wpollock 3y ago>SQL is much more powerful than most people think, and taking an afternoon to learn everything you can do with it is a great investment. SQL is indeed powerful but how can anyone learn SQL well in an afternoon?
- lovasoa 3y agoMaybe I'm mistaken, but I think someone who is already using a relational database through an ORM can learn enough to make powerful queries in an afternoon. Let's see what we need: - SELECT a,b,c FROM table WHERE condition : 1 hour - INNER JOIN, LEFT JOIN : 1 hour - GROUP BY, HAVING, aggregation functions: 1 hour - subqueries, EXISTS : 1 hour - recursive queries : 1,5 hours - end of the afternoon You'll probably need to practice a little after that intense afternoon, but I do think that after learning just the five points above, you can become the most knowledgeable person about SQL in your team.
- antod 3y agoYou originally said "everything you can do with it" rather than just the basics though. Those goal posts moved pretty far. I agree with learning most of your examples in an afternoon, but really knowing SQL takes a hell of a lot longer than that. In fact even the most SQL shy ORM preferring devs I've worked with still know those basics.
- lovasoa 3y agoWhere do you work? That must be a great place! Most devs I know, even talented ones, have never done a recursive query, and a lot of them don't even know it's possible.