Member-only story
Do You Really Know How To SQL? What Database Engineers Actually Recommend You Should Do.
There is a vast amount of production code out there with SQL statements embedded into the application code, and many other things that database engineers consider obscure. In my career, I was lucky to be able to work with some of the most seasoned database engineers. Not just those who write and run large scale SQL, but those who write the code that runs databases like MySQL, Microsoft SQL Server and Oracle. What most of these highly experienced database engineers often recommend is very different from what many developers out there actually build.
Over 20 years ago, I was a rebellious teenager just like any teenager is. But when it came to software engineering, I carefully listened to the boomers and wanted to extract as much knowledge from them as possible. There are key statements that struck me the most. I heard them repeatidly from the most senior database engineers. These were “SQL doesn’t belong into application code” and “Applications shall never touch tables”. Let’s explore what these database engineers want to teach us with that.
No, you can’t touch the tables
When I was young, I wrote an application that was supposed to connect to larger Oracle database cluster. The senior engineer carefully investigated my access…