Monday, March 26, 2012

data dimension

In the class today, Dr. Rum has talked about the dimensions of attributes, which are time, membership type, members, items, events, Quantity, sales amount, total numbers of members, while the facts are quantity and sales amount. The quantity has three dimensions: time, items, members, (TSK, ISK, MSK), and the vendor is not part of the schema. Besides, we need to set the schema to validate the slowly changing dimensions, for example, we need to store the history, so that when we retrieve the data, we know that there is something that has changed from previous record. Alternative, we can use to create new tuple or add an attribute to make the data schema more accurate. For example, we can add a new column named "new xxx" while keep the "old xxx" at the same time. So there is no need to add another SK.
Since the dimension is short but fat, so there are so many attributes and we can use the hybrid methods to solve the problem, e.g. creating new column for some attributes, and dealing with the slowing changing dimensions for other attributes. Designing a dimensional model is kind of a art. It comes to the thinking side to decide which attribute to change, and technical side on what tools are we going to use.

Role playing Dimension can be time, because time can be interpreted and separated way. The airline company can use the time to be a role playing dimension and set some sub-attributes like departure time, arrival time, etc. for the time dimension. Besides, there some dimensions that cannot be predicted like quantity in hand. we can use average, maximum, minimum, etc. to represent the data set.

There are many ways to deal with the data. All the decisions are based on the DBA. So think carefully before execute, then come out with the accurate data.