Re: The tragedy of SQL
От | Raymond Brinzer |
---|---|
Тема | Re: The tragedy of SQL |
Дата | |
Msg-id | CANasJHnaqMeBOFqYJvRK+Jk6ifVM94XO-tAaSdVemA=90EO2Hw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: The tragedy of SQL (Brian Dunavant <dunavant@gmail.com>) |
Список | pgsql-general |
On Tue, Sep 14, 2021 at 2:41 PM Brian Dunavant <dunavant@gmail.com> wrote: > I have the opposite perspective. As a dev/manager, SQL is much more powerful at getting data storage from abstract concept,into a usable structure, than any programming language I've had the (mis)fortune of using. I've long since lostcount of the massive volume of other people's code (especially ORMs) I've removed and replaced by updating SQL statementsto do all the logic, and return me exactly what I want. And typically this also comes with a (sometimes massive)performance gain. > > I've managed many a programmer that would complain that SQL is too hard and they don't want to learn it, but had no problemspending days learning the ORM of the month that "saves them time" and writing complex inscrutable monstrosities withthem. > > Could SQL be better? Absolutely. But in terms of bang-for-my-buck, I feel learning SQL has saved me more clock-time,and improved my productivity/value probably more than any other individual language in my career. Your experience doesn't surprise me at all. Sure; it's better than the alternatives. An ORM can be a net benefit if you're doing simple things, but the more complex the query, the more it starts to feel like you're trying to have a serious conversation through a bad translator. This encourages programmers to keep queries simple, treat the database as a big scratchpad, and do all the processing in code. This easily turns into "reinventing the wheel, badly". I would argue, though, that the programmers aren't completely wrong. A good programmer strives for clarity, expressing ideas simply and naturally, and avoiding repetition; SQL isn't good for that. But papering over the problem on the software side isn't the solution. I'd just emphasize our agreement: SQL (or another query language, sitting in the same niche) could be better. So it should be. -- Ray Brinzer
В списке pgsql-general по дате отправления: