Professional Documents
Culture Documents
Defining Data Warehouse Structures: End User Data Access Data Sources Staging Area Data Marts
Defining Data Warehouse Structures: End User Data Access Data Sources Staging Area Data Marts
Data Warehouse Data Sources Staging Area Data Marts End User Data Access
OLAP
End User Data Access
Data Marts
Time_Dim
TimeKey TheDate ...
Sales_Fact
TimeKey EmployeeKey ProductKey CustomerKey ShipperKey Sales Amount Unit Sales ...
Product_Dim
ProductKey ProductID ...
Shipper_Dim
ShipperKey ShipperID ...
Customer_Dim
CustomerKey CustomerID ...
Describing Dimensions
Describing Business Entities Containing Attributes That Provide Context to Numeric Data Presenting Data Organized into Hierarchies
Primary Keys
Identify Uniqueness Are the Dimension Columns Referenced in the Fact Table
product_dim_key product_id_app
Two Candidates
Application Keys (app suffix) Are Source Data Values That Identify Uniqueness Surrogate Keys (key suffix) Are System-generated Integers That Identify Uniqueness
Defining Hierarchies
Understanding Benefits of Hierarchies
Allow end users to view data at different levels of summarization Provide drill down / drill up paths of analysis Drill Down Drill Up
Implementing Hierarchies
Sales_fact Table
Foreign Keys Measures
product_dim
25 123 Chai
time_dim
134 1/1/2000
The grain of the sales_fact table is defined by the lowest level of detail stored in each dimension associated with the fact table The grain of the sales_fact table is sales data by customer ID, product ID, and order date
Physically implement the relationship between FK columns of the fact table and PKs of dimension tables Enforce referential integrity between the dimension tables and the fact table
OLAP
End User Data Access
Data Marts
Numeric Measures
Dimensions
Cubes
Relational
Year
Quarter Month
Q1 Q1 Jan Feb
Quarter
Month
RELATIONAL
OLAP
Drinks is the Parent of Tea and Coffee Tea and Coffee are Children of Drinks Tea and Columbian are Descendants of Drinks
Cube Measures
Are the Numeric Values of Principal Interest Correspond to a Fact Tables Facts (or Measures) Intersect All Dimensions at All Levels Are Aggregated at All Levels of Detail
Form a Dimension
The Cube
Querying a Cube
Q1
1000
Q2
Q3 Grapes Cherries Melons Apples Ave Sales Net Sales Units Units Price Dollars Measures Dimension
Q4
Q1
Q2
Q3
Q4
Ave Units Sales Units
Measures Dimension