4 ms·
Frankly, the biggest problem with SQL is that not enough people know it well (and a lot of people think they know it well).
by forinti 4y ago
Frankly, the biggest problem with SQL is that not enough people know it well (and a lot of people think they know it well).
- jppope 4y agoRoughly would you consider your statement equal to "SQL is designed for experts?" just curious
- forinti 4y agoNot at all. I think it looks deceptively simple so programmers don't waste too much time learning it properly. But you can take up a good book (such as Joe Celko's) and set up a good foundation in a short time.
- aae42 4y agohe seems to have done a whole series, which would you recommend?
- forinti 4y ago"SQL for Smarties" is a good book to learn the language and "Puzzles and Answers" has a good collection of problems/solutions for typical situations you might find in real life.
- onetom 4y agoI happened to be in charge of organizing the translation of one of Celko's books to Hungarian. I even translated some chapters myself and proof-read the other chapters. It was indeed an eye-opening exercise! My background at that time was DBase, FoxPro and reading the Postgres docs. It was great to read don't recommendations about how to use the toolkit of SQL to answer real-world questions.
- Rodeoclash 4y agoExactly. Even knowing a small bit of SQL (i.e. enough to know the full scope of what SQL can give you so you grok the limits of your ability) is a super power compared to using ORMs. The right views, applied in the right places are like a super power compared to trying to do the same thing in application code.
- randomdata 4y agoSQL is one of, if not the most, common programming language out there. I agree it isn't known well, but it not lending itself to being known well, and tricking people into thinking they know it well, is a flaw of the language. This is a much bigger problem. A good language would not lead people down that path. It not being known well certainly is not for lack of exposure. They used to say the problem with C (especially with respect to memory issues) was that people didn't know it well, which was also true to some extent, but then we realized that we could improve language design to not leave people in that situation in the first place. Something like Rust would have never materialized if people simply took the attitude that you just need to hunker down and know C harder. SQL is ripe for a similar evolution, but such evolution is difficult when the only reason we settled on SQL in the first place was to be compatible with Oracle and Oracle has no reason to change as long as the money keeps flowing in. The competition was going down some other interesting paths for a while. Even Postgres originally used QUEL, which is much closer to Codd's original vision, instead of SQL but eventually had to accept that Oracle won. But does Oracle need to win forever?
- majewsky 4y ago> SQL is one of, if not the most, common programming language out there. Agreed with "one of", but the most common programming language is definitely Excel.
- onetom 4y agoI have just learned about the RETURNING close of INSERT just a few months ago for example and I'm programming since 1983... and I've learnt it from someone, who is 20 years older than me...
- forinti 4y agoI started using databases a lot at a time when I was coding in Java. I would search for SQL tricks that would simplify my Java, so RETURNING was one of the first things I used heavily. Soon I discovered window functions so that I could, for instance, get my data back with an extra column with the total number of rows, or the data in the first and last rows, and so on. These little things had a large impact on the number of lines of Java that I had to write.
- funcDropShadow 4y agoThat is one of the reasons why I enjoy working with PostgreSQL. It's reference manual is of such high quality, that I consult it before Google or Stack Overflow when I have questions. That lead me to the discovery of many useful features of the years.
- ttfkam 4y agoOne of the biggest eye-openers for me was this chart. https://www.sql-workbench.eu/dbms_comparison.html https://www.sql-workbench.eu/dbms_comparison.html One day I just sat down and learned about every item on that table. Not memorizing, just learning what it was for. Not only did my concept of what you can do with a database expand dramatically but also the limitations of insisting on hacking up equivalents in your own application code. It's amazing how many steps can be skipped and race conditions can be avoided by leaning into the SQL.