Total Pageviews

Monday, 8 September 2014

Who's afraid of SQL?

I refer to a blog I have just read which was referenced in today's Code Project email.

http://unconnected1.blogspot.ca/2014/09/why-are-developers-so-afraid-of-sql.html

There are a few good points here but I'm a little disturbed about the one dimensional view (i.e. from a SQL developer's view) and the style of presentation of a blog which could be extremely useful.

Where to start?

Firstly the implication here is that ALL (non-SQL) developers are scared of SQL. This is like saying all drivers on the road are bad because a few cut you up occasionally. Granted there are bad developers out there (for all sorts of reasons) but there are many who embrace SQL as a useful and powerful tool in the developer's armoury of equipment.

Then there is the implication that ALL SQL developers (yes, they are developers too) get it right all the time. No they don't - just like everyone else, there is good and bad ways of doing things (he states examples of his own).

There is also the frequent use the word 'stupid'. I have often found this type of approach to educating people rather less than helpful. People don't like being called stupid and, in fact, most developers I have met in the 34 years I have been doing this are far from it. They may be entrenched in their ways or even unwilling to learn anything new (sadly all too frequent) but they are not stupid.

Finally there is SQL itself. I use SQL a fair amount on various different platforms. For all its merits in terms of its 'English language' approach, it is far from the perfect tool.

As I write this, I am embarking on an exercise breaking down a tortuous Oracle query into several subcomponents callable from a C# program. In this case (and for process as well as performance), it is more efficient to load the various datasets (4 much simpler queries) into memory and index them internally than it is to retrieve getting on for a million rows of data, much of which is null, and then attempting to resolve the logic required.

I have seen some extremely tortuous and borderline incomprehensible SQL in my time. Sometimes taking the logic and breaking it down into simpler stages procedurally has increased both performance and maintainability of the process.

I am a developer who likes SQL, but it can't cure everything.

No comments:

Post a Comment