Databases Reference
In-Depth Information
Edward Melomed
Irina Gorbach
Irina Gorbach
Club 1% Milk
Club 1% Milk
Club 2% Milk
Club 2% Milk
FIGURE 2.2
A slice of the sales from January.
Dimension Attributes
But how would you define the space of sales by quarter rather than by month? As long as
you have a single attribute (months) for your Time dimension, you would have to manu-
ally (or in our imaginations) group the months into quarters. When you're looking at
multiple years, your manual grouping starts to be unwieldy.
What you need is some way to visualize the months, quarters, and years (and any other
kind of division of time, maybe days) in relation to each other—sort of like a ruler enables
us to visualize the various divisions of a foot or a yard, and the inches and standard frac-
tions of inches along the way.
In essence, what you need is additional attributes (quarters, years, and so forth). Now you
can use months as your key attribute and relate the other attributes (related attributes) to
the months—3 months to a quarter, 12 to a year.
So, back to our example. We want to “see” the individual months in each quarter and year.
To do this, we'll add two related attributes to the Time dimension (quarter and year) and
create a relationship between those related attributes and the key attribute (month). Now
we can create a “ruler,” like the one in Figure 2.3, for the dimension: year-quarter-month.
 
Search WWH ::




Custom Search