It will be a bit of a rant, but I am really annoyed by the software in which people are trying to invent their own query language. We already have a trillion different ORMs, another trillion databases with their own query language each, and another trillion SaaS products, for access to which you need to master some regular DSL they came up with.
Give me my SQL back. This language is understandable to everyone, there is already since the 70s and during that time managed to become a standard. It is easy to read and can be used by anyone, from business to engineers.
However, instead, I have to study a whole heap of different "garbage query language" because people are still trying to reinvent the wheel.
Let's start with ORM. Their main feature is a reduction in development time. But instead of writing comprehensible to all SQL, I have to study the documentation of a particular ORM in order to figure out how to write my queries for it. In addition, I have to spend time debugging, find out why this ORM translated my query into some monstrous SQL, which combines 17 tables using their full scan. Instead of sticking to standard SQL, where it’s easy enough to talk about efficiency ("try using indexed columns in predicates", "do not overdo it with joines in one query", etc.), I have to deal with an additional muddy layer hides the original SQL query. In the end, you’ll be left with higher-level swollen data classes, instead of having to deal with simple database structures that are easy to understand and process.
Not to mention the fact that there are about five thousand ORMs, so instead of learning SQL, I have to study 34 different ORMs once. This does not mean that people learn ORM, it means that they simply do not learn SQL.
And all these SaaS products. I just picked a few from my company's stack:
What could be worse than dumping data? A data dump that invents its own query language.
To be fair, some of these queries are still SQL-like, or at least claim this role, but with my own quirks that make me drop everything I knew about SQL before. Sometimes to the extent that this past knowledge may be practically useless.
In addition, each database also tries to reinvent the query language. Mongo has its terrible query language , which I never understood, Lucene has its own , etc.
What am I asking? In fact, not much:
That's all. I understand what looks like an old grumbler, but I take this risk on myself.
This post received a sufficient number of views, so it should cause a keen interest among the public. Follow the discussion on Hacker News and comments on Reddit r / programming .
Source: https://habr.com/ru/post/422667/
All Articles