Hierarchies in A Data Warehouse

I’ll start discussing dimension hierarchies by showing you how to identify hierarchies in the dimensions of a data warehouse.

To identify a hierarchy in a dimension, you must first understand the meaning of dimension columns. You can then identify two or more columns that are of the same subject. For example, the date, the month, the quarter, and the year have the same subject because they all have something to do with the calendar. Columns of the same subject form a group. A column in a group must contain at least another member of the group. As an example, in the group mentioned earlier, the month contains the date. The chain of these columns form a hierarchy. For example, the date-month-quarter-year chain is a hierarchy in the date dimension.

In addition to the date dimension, the product and customer dimensions also have hierarchies. Figure 15.1 shows the columns of the hierarchies in bold.

Figure 15.1. Schema Showing Hierarchies


Table 15.1 shows the hierarchies of the three dimensions. Note that the customer dimension has two-path hierarchies.

Table 15.1. Hierarchies in customer_dim, product_dim, and date_dim
customer_dimproduct_dimdate_dim
customer_street_addressshipping_addressproduct_namedate
customer_zip_codeshipping_zip_codeproduct_categorymonth_name
customer_cityshipping_city quarter
customer_stateshipping_state year

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.221.144