SQL is 43 years old – Here’s why we still use it today
There just is no substitute for SQL. Some thoughts on what has given it a bad name:<p>1) The pervasive use of artificial keys. USE NATURAL KEYS. Unfortunately probably 99% of real-world databases were designed with artificial keys. I wish I could point to some literature on this topic. It is very rare and I only came to learn about this from a DBA who is well-versed in designing with natural keys. I&#x27;m trying to get him to publish more on this topic.<p>2) ORMs. This is just a bad practice. Their use in part derives from the awful schemas designed with artificial keys, requiring another layer of complexity to get a more intuitive model of the data. Fortunately for me over the past 3 years I&#x27;ve been doing almost all my application I&#x2F;O with F#&#x27;s SQL Type Provider, SqlClient, <a href="http:&#x2F;&#x2F;fsprojects.github.io&#x2F;FSharp.Data.SqlClient&#x2F;" rel="nofollow">http:&#x2F;&#x2F;fsprojects.github.io&#x2F;FSharp.Data.SqlClient&#x2F;</a> , which strongly types native query results, functions, and SPROCS. Just does not work if you need to construct dynamic SQL. I&#x27;ve been trying to goad the author into also providing meta data retrieval. That would be the icing on the cake.<p>3) SQL does not seem to be a required topic for undergrads. There are really no unsolved problems (of note), so it&#x27;s not interesting to academics.<p>4) Most app programmers don&#x27;t get much practice writing difficult queries or tuning problem queries, so that one time every 9 months when you do something hard, it is hard. (And again, often compounded by the complexity introduced by artificial keys.)