Tuesday, October 22, 2013

Some DBA thoughts

Despite the malaise from which I seem to have been suffering in the past few weeks due to lack of quality sleep, I am trying to study as much as possible. On the one hand, this means studying all the various statistical tests, whereas on the other hand, I am revisiting the material which I learnt earlier in the year for the exam which I missed (mainly about literature reviews). I am trying as much as possible to study this material dispassionately: trying to learn it as it is presented and not as how it affects my own research.

Even so ... this morning I was asked about one of our business units and why they don't work properly. I didn't give a very clear answer, but thinking about it now, I can explain more clearly (at least to myself!). As far as I am concerned, people who work with Excel (or to be polite, end user computing) in an ERP environment are like programmers who learnt Access and then try to use what they have learnt in an environment which uses SQL: they are using a 'record' way of thinking as opposed to a 'set' way of thinking ('set' as in 'set theory'). This is a common failing of programmers new to SQL.

Specifically: this business unit asked me for data about parts which have been ordered (the users are never precise enough; what they mean is parts which customers have ordered, as opposed to the parts which we need to purchase in order to produce the parts which we will sell to the customers). I gave them totals per part - a 'set' way of thinking - whereas they persist in asking me for part amounts per order - a 'record' way of thinking. I contend that they would be able to do their job better if they left the conception of a record/order behind and started thinking in terms of aggregates (sets).

This is especially important when considering purchasing: there are two types of purchasing approaches, bulk and specific. The purchaser does not need to know for which orders a bulk item is required, just that 10,000 units have to arrive before a specific date so that all the customer orders can be fulfilled. A purchaser does not have to know the purpose of a part which is bought specifically in order to fulfill a given customer order, but it helps. Obviously, parts which are expensive and used only rarely will be purchased specifically whereas parts which are used frequently will be purchased in bulk.

Translating between the terms, bulk purchasing is a 'set' way of thinking whereas specific purchasing is the 'record' way of thinking.

No comments: