Managing Master Data Management

I worked for an organisation that had a big goal — to roll out Master Data Management across all the global offices (spanning the globe from Asia to the Americas.) To say it was a tough challenge was an understatement. There was a dedicated team from HQ that flew around the world to gather requirements in their efforts to build this “one system to rule them all.”

This mega-project met its demise within a few months when its entire team was disbanded and let go by the organisation. The project failed to meet its timelines and objectives quickly enough, but the fault did not lie entirely with them. I suppose the management buy-in was not strong enough across the globe and the obstacles faced were too many.

Any MDM project should have strong management backing and a small series of achievable goals for the initial phases. Whilst this may not be the only approach, it will help to take baby-steps towards achieving such a big goal.

Simplifying logic

Sometime in the past, I came across this piece of SQL code:
(CASE WHEN (a.DebitBalance – b.TotScaledDown) > 0 THEN a.DebitBalance – b.TotScaledDown ELSE 0 END)

Logically not wrong, but the number of mathematical operations can be cut further to increase processing speed.

Zoom in here
(a.DebitBalance – b.TotScaledDown) > 0

There is an arithmetic operation and a comparison operation here. This can be reduced to a single comparison operation with no loss in logic. The arithmetic operation is only executed when the expression is true, otherwise the literal 0 is returned.
(CASE WHEN (a.DebitBalance > b.TotScaledDown) THEN a.DebitBalance – b.TotScaledDown ELSE 0 END)

Of course I may be wrong as I was not able to do any benchmarking to compare the code performance.