The fact table stores the measures of the business and points to the key value at the lowest level of each dimension table. The measures are quantitative or factual data about the subject. The measures are generally numeric and correspond to the how much or how many aspects of a question. Examples of measures are price, product sales, product inventory, revenue, and so forth. A measure can be based on a column in a table or it can be calculated.
Table 8 shows a fact table whose measures are sums of the units sold, the revenue, and the profit for the sales of that product to that account on that day.
Product Code | Account Code | Day Code | Units Sold | Revenue | Profit |
---|---|---|---|---|---|
1 | 5 | 32104 | 1 | 82.12 | 27.12 |
3 | 17 | 33111 | 2 | 171.12 | 66.00 |
1 | 13 | 32567 | 1 | 82.12 | 27.12 |
Before you design a fact table, you must determine the granularity of the fact table. The granularity corresponds to how you define an individual low-level record in that fact table. The granularity might be the individual transaction, a daily snapshot, or a monthly snapshot. The fact table in Table 8 contains one row for every product sold to each account each day. Thus, the granularity of the fact table is expressed as product by account by day.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]