SQLServerCentral Editorial

Database Taming

,

One of the worst aspects of living with a technologist is the strange way that he or she will do anything, and everything, to overcome a technical problem. This thought occurred to me as I realised that it was well past midnight, and I still hadn't got a query running satisfactorily.

Eventually, I decided to abandon the quest, temporarily, and switch off the computer. When apologising for my behaviour the next morning over breakfast, I explained it like this.

"I know it seems silly, and the query isn't a job-stopper. The problem is that every fibre of my body itches to solve the problem. Taming technology is a battle of wills. It is you against the technology. You must stay eye-to-eye with it, unflinchingly."

Any surviving lion tamer will tell you the same. The direct gaze is the lion tamer's most valuable tool. To control a lion is to be brave enough to look at it eye to eye; if your nerve fails you at the critical point, it can prove fatal.

Unflinching eye contact also helps enormously in the battle of wills with a wild or flighty horse. Sometimes the database can seem to be as wilful as a colt. Your task is to persuade it to produce that report without rounding errors, nor anomalies due to NULL values. It stares at you fractiously. You must maintain eye contact. Never show fear. It flares its nostrils, snorting occasionally. If you lose confidence, you will be thrown. Either you master the recalcitrant database or retire, sadly, into the dingy half-life of IT management.

Of course, database taming is more complicated than this. Sometimes, direct confrontation and the battle of wills can end in an unsatisfactory truce, resulting in applying hints, using cursors or denormalising. Sometimes, it is better to back off and apply 'time-out'. I like to think that my databases pine for my constant attention, but in truth time away from them gives me time to think.

Suddenly, the thought hit me: I'd used entirely the wrong algorithm for achieving the result, and the true solution, much simpler and more robust, flowed into my conscious brain. Those few hours of sleep had been enough for reflection. Perhaps good database development and administration requires a mixture of eye contact and meditation. Perhaps there comes a time when every database tamer needs to leap quickly over the fence, and chill out for a while.

Phil Factor

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating