Presentation is loading. Please wait.

Presentation is loading. Please wait.

Defining Data Warehouse Structures Data Warehouse Data Access End User Data Access Data Sources Staging Area Data Marts Data Extract, Transform, and Load.

Similar presentations


Presentation on theme: "Defining Data Warehouse Structures Data Warehouse Data Access End User Data Access Data Sources Staging Area Data Marts Data Extract, Transform, and Load."— Presentation transcript:

1 Defining Data Warehouse Structures Data Warehouse Data Access End User Data Access Data Sources Staging Area Data Marts Data Extract, Transform, and Load

2 Data Warehouse Structures Overview End User Data Access Data Marts OLAP Data Warehouse

3 The Star SchemaEmployee_DimEmployee_Dim EmployeeKey EmployeeID... EmployeeID... Time_DimTime_Dim TimeKey TheDate... TheDate... Product_DimProduct_Dim ProductKey ProductID... ProductID... Customer_DimCustomer_Dim CustomerKey CustomerID... CustomerID... Shipper_DimShipper_Dim ShipperKey ShipperID... ShipperID... Sales_Fact TimeKey EmployeeKey ProductKey CustomerKey ShipperKey TimeKey EmployeeKey ProductKey CustomerKey ShipperKey Sales Amount Unit Sales... Sales Amount Unit Sales...

4 Describing Dimensions Describing Business Entities Containing Attributes That Provide Context to Numeric Data Presenting Data Organized into Hierarchies

5 Identifying Primary Keys Primary Keys Identify Uniqueness Are the Dimension Columns Referenced in the Fact Table Two Candidates Application Keys (app suffix) Are Source Data Values That Identify Uniqueness Surrogate Keys (key suffix) Are System-generated Integers That Identify Uniqueness product_id_app product_dim_key

6 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 Denormalized star schema dimensions Normalized snowflake dimensions

7 Snowflaked Dimension Tables Defines Hierarchies by Using Multiple Dimension Tables Is More Normalized than a Single Table Dimension

8 Describing Fact Tables Inventory Data By Inventory Date, Product, and Warehouse Sales Data By Product, Customer, and Order Date

9 Identifying Fact Table Components Dimension Tables customer_dimcustomer_dim 201 ALFI Alfreds product_dimproduct_dim 25 123 Chai Sales_fact Table customer_key product_key time_key quantity_sales amount_sales Foreign Keys 2012513440010,789 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 134 1/1/2000 time_dimtime_dim Measures

10 Defining Foreign Keys time_dim_key product_dim_key customer_dim_key product_key customer_key order_date_key FOREIGN KEY Constraint FOREIGN KEY Constraint FOREIGN KEY Constraint 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

11 Relational Schemas and OLAP End User Data Access Data Marts OLAP Data Warehouse OLAP

12 OLAP Database Components Numeric Measures Data values or facts that users analyze Dimensions Business categories that provide context to numeric measures Sourced from columns in star schema dimensions Members are organized into hierarchies Cubes Combine dimensions and measures into one conceptual model Logical storage medium for an OLAP database

13 Relational Dimensions vs. OLAP Dimensions REGION West CA OR East MA NY REGION West East STATEREGION CAWest ORWest MAEast NYEast OLAP Relational

14 OLAP Dimension Fundamentals Year Quarter Month 1999 Q1 Jan 1999 Q1 Feb … … … Time Dimension Table Month Quarter Year RELATIONAL OLAP

15 Drinks Tea Lemon Earl Grey Coffee Columbian Dimension Family Relationships  Drinks is the Parent of Tea and Coffee  Tea and Coffee are Children of Drinks  Tea and Coffee are Siblings  Tea and Columbian are Descendants of Drinks  Tea and Drinks are Ancestors of Earl Grey  Lemon and Columbian are Cousins  All are dimension Members Drinks Tea Lemon Earl Grey Coffee Columbian

16 Cube Measures Are the Numeric Values of Principal Interest Correspond to a Fact Table’s Facts (or Measures) Intersect All Dimensions at All Levels Are Aggregated at All Levels of Detail Form a Dimension

17 The Cube Measures Dimension Products Dimension Time Dimension Ave Units Sales Dollars Sales Units Net Price Q4 Q3 Q2 Apples Cherries Grapes Q1 Melons 2002

18 Measures Dimension Products Dimension Q4 Q3 Q2 Time Dimension Apples Cherries Grapes Q1 Melons Querying a Cube Ave Units Sales Dollars Sales Units Net Price 1000

19 Apples Measures Dimension Products Dimension Q4 Q3 Q2 Q1 Time Dimension Melons Cherries Grapes Defining a Cube Slice Ave Units Sales Dollars Sales Units Net Price


Download ppt "Defining Data Warehouse Structures Data Warehouse Data Access End User Data Access Data Sources Staging Area Data Marts Data Extract, Transform, and Load."

Similar presentations


Ads by Google