SQL was developed almost half a century ago with a goal to empower non-programmers to excel at relational database management systems. As a result, it has been regarded as one of the most favourable languages for database management. In a 2020 Stack Overflow Developer, SurveySQL emerged as the third most commonly used language by professional developers and hobby coders alike.

However, unlike any other language, it has been facing inadequacy in support of the new requirements, compatibility with platforms, models of use and productivity.

SQL has also been termed a clay elephant that is cumbersome and extremely unstable. Reddit is filled with comments like “SQL is crap”, but before jumping to such assumptions, one must understand what went wrong with this domain-specific, widely acclaimed language. 

SQL and orthogonality

Orthogonality is a feature that is very important in a programming language. The feature allows programmers to construct major commands from a small set of primitive commands. A good language should have fewer commands and should be consistent with more occasional exceptions. This is not precisely the case with SQL. In SQL, generic substitution is not possible because most expressions are mutually incompatible. All these features make SQL a language with bad orthogonality and a vast number of exceptions. 

A complex language 

SQL was developed for non-programmers and promised English like ease for them, but it failed to evolve positively with time. Moreover, its verbosity makes it challenging to write and analyse queries. The market now has better alternatives than to learn a language with such a large body.

Donald D. Chamberlain, the creator of SQL said, “Over the years, I have been surprised to see that SQL is more frequently used by trained database specialists to implement repetitive transactions such as bank deposits, credit card purchases, and online auctions. I am pleased to see the language used in a variety of environments, even though it has not proved to be as accessible to untrained users as Ray and I originally hoped.”

Inconsistency

The set of rules for the structure of the language and the meaning of commands are very arbitrary in SQL. These semantics and syntax create more problems for the user if the SQL version of the user and the database are different. This lack of consistency creates enormous problems for data scientists.

Poor cohesion

SQL presents considerable difficulty in integration with other application languages and protocols. This makes tasks for data scientists very difficult.

Null marker

Null marker is perhaps the most cumbersome aspect of SQL. It indicates the absence of value and is entirely distinct from 0 or any empty string for a text column. As a result, it hands out inadequate data that can be perceived as a problem of relational models. 

Duplication problems

SQL allows duplication of rows integrating with languages such as Python. However, a drawback of combining with such a language is that the data might get misrepresented at times in terms of modularity.

Mismatched databases

SQL was designed to be used both as a language for interactive queries and an application development language for online transaction processing (OLTP). The significant difference between the host and SQL’s database is that the former tends to be more procedural while the latter leans towards declarative. This mismatch increases complexity and interferes with the global optimisation of SQL.

Other challenges

The relational model of SQL is pretty good, but there are many complex problems that data scientists experience with using SQL. The language is not expressive, challenging to comprehend, and not very porous. These complexities make it difficult for a programmer to write in it and take longer to code. 

The time drag that comes with the complexities of the language negatively impacts innovation and run-time. To work with the language, there is a need for a self-written application that would coordinate with databases and the users, making the best features of relational databases useless. 

Michael Stonebreaker might have been right when he said, “My biggest complaint about System R is that the team never stopped to clean up SQL… All the annoying features of the language have endured to this day.”

The post Is SQL Still Relevant? appeared first on Analytics India Magazine.