Beruflich Dokumente
Kultur Dokumente
Dimension
Attributes
Dimension Dimension
Attributes Attributes
Fact
Measures
Star schema
Dimension
Attributes Dimension
Attributes
Snowflake schema Dimension
Attributes
The Data Warehouse Design Process
Factory Line
Salesperson
Department
Warehouse
Customer
Account
Product
Shipper
Time
Business Processes
Manufacturing x x x
Order Processing x x x x
Order Fulfilment x x x
Financial Accounting x x x
Inventory Management x x x
Time
(Order Date Salesperson
and Ship Date)
Calendar Year Region
Month Country
Date Territory
Fiscal Year Manager
Fiscal Quarter
Sales Order Name
Month Name
Date Item Quantity
Unit Cost
Total Cost
Unit Price
Sales Amount Country
Category Shipping Cost State or Province
Subcategory City
Product Name Age
Color Marital Status
Size Gender
Product Customer
Lesson 2: Designing Dimension Tables
Hierarchy
Drill-through detail
Unknown and None
1002 2.00
Dimension Table
DiscKey DiscAltKey DiscountType
1003 0.50 Promotion
-1 Unknown Unknown
1004 2.50 Other
0 N/A None
1005 0.00 N/A
1 Bulk Discount Bulk Discount
1006 1.50
2 Promotion Promotion
Source 3 Other Other
Designing Slowly Changing Dimensions
CustKey CustAltKey Name Phone
Type 2
CustKey CustAltKey Name City Current Start End
Surrogate key
Granularity
Range
Attributes and hierarchies
Multiple calendars
Unknown values
Self-Referencing Dimension Tables
Kim Abercrombie
Kamil Amireh
Jeff Hay
Cesar Garcia
Junk Dimensions
2 1 1 Debit
3 1 0 Credit
4 1 0 Debit
5 0 1 Credit
6 0 1 Debit
7 0 0 Credit
8 0 0 Debit
Dimension Keys
OrderDateKey ProductKey CustomerKey OrderNo Qty SalesAmount
20120101 25 120 1000 1 350.99
Measures
OrderDateKey ProductKey CustomerKey OrderNo Qty SalesAmount
20120101 25 120 1000 1 350.99
Degenerate Dimensions
OrderDateKey ProductKey CustomerKey OrderNo Qty SalesAmount
20120101 25 120 1000 1 350.99
Additive
OrderDateKey ProductKey CustomerKey SalesAmount
20120101 25 120 350.99
Semi-Additive
DateKey ProductKey StockCount
20120101 25 23
20120101 99 118
20120102 25 22
Non-Additive
OrderDateKey ProductKey CustomerKey ProfitMargin
20120101 25 120 25
20120101 99 120 22
20120102 25 178 27
Types of Fact Table
ETL Loads
Bulk inserts
Data Models
Report Processing
Some lookups and Predictable queries
updates Many rows with range-based
query filters
ETL
Reports
Large fact
tables
Self-Service BI
Potentially
Star joins to
unpredictable
dimension
queries
tables
User Queries
Consideration for Database Files
...
Jan Feb
Pre-2010 2010 2011
2012 2012
Demonstration: Partitioning a Fact Table
Logon Information
Virtual machine: 20463C-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa$$w0rd
Review Question(s)