For example,
the fact table might store the price of the item sold as well as its cost, so a simple
calculation to get the gross profit on that item could be included in the fact table in
the DSV.
In the case of this example, the named calculation is being used for string
concatenation. The DimEmployee table has three columns for a person??™s name:
FirstName, MiddleName, and LastName. The named calculation shown in Figure 3-9
combines all the names into a single column called FullName. The fact that FullName
is a named calculation is easy to see by the small calculator icon placed next to it.
The DSV is very powerful. Named queries can be added that, in effect, create new
tables. Calculations can be added to existing tables, which can speed up cube queries
later because the numbers are actually materialized in the cube itself. Tables in the
Figure 3-9 A new view of the DSV showing a named query has been used to replace
the product dimension snowflake tables, and a named calculation has been
added as well.
C h a p t e r 3 : D a t a W a r e h o u s i n g a n d B u s i n e s s I n t e l l i g e n c e 55
DSV can be joined or joins can be removed. Items can be renamed to friendlier
names, and more. The DSV is very powerful and it is critically important because a
cube can only be built from a DSV. Cubes have no knowledge of any data sources
other than a DSV.
Designing the Cube and Dimensions
Once the DSV has been completed, the next step is to build the cube and dimensions.
Pages:
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100