Stage 5: Using attributes
It's good to know how many shoes have been sold, but to find which exact shoes are sold will better enable our society "Best Foot Forward" to prosper. The different stores will have to provide more accurate data on their sales, by indicating each day the number of models sold in each available reference.
We are going therefore to replace the dimension Style by the dimension Reference. Thus, we know for example that the store "Paris Bastille" has sold 7 shoe pars with reference 215431324 on 18 August 1998. It's now very practical for management of orders. No more left-overs or understockings !
On the other hand, it is more difficult to know the state of the market. Nevertheless, we just have to define attributes for each reference of shoe. Possible values are Color (blue, blank, red), Substance (leather, cloth, synthetic), or Type (man, woman, child). If references are different for each size of a pattern, then Size can also be an attribute, otherwise it will be a new dimension.
As soon as a new reference is proposed, the administrator just has to type its characteristics. In the OLAP system, Color, Substance and Type are new dimensions. To define attributes for each reference, the system builds relations.
With these relationships, we can build new formulas, dimentioned by one or more of these attributes instead of the "reference" dimension. The system uses the values by reference to build the totals by attribute when the user consults the data.
You will have guessed it, our OLAP database can now reply to questions such as :
- What color of shoe is sold the most in August 1998 ?
- How many feminine shoes in leather did the "Paris Bastille" store sell in 1998 ?
- What is the share of man, woman and children shoes at "Best Foot Forward" ?