5 Lecture 5-Building Dimensional Models
5 Lecture 5-Building Dimensional Models
5 Lecture 5-Building Dimensional Models
02/17/24 2
When requirements cannot be fully determined, we
need a new and innovative concept to gather and
record the requirements.
Users tend to think in terms of business dimensions
and analyze measurements along such business
dimensions.
To determine the measurements and the relevant
dimensions that must be captured and kept in the
data warehouse, you come up with what is known as
an information package for the specific subject.
02/17/24 3
Information packages
A new concept of acquiring business requirements
02/17/24 4
Information packages
Business Requirements phase essentially help to compile
information packages for all the subjects of the Data
Warehouse
• Define the common subject areas
• Design key business metrics
• Decide how data must be presented
• Determine how users will aggregate or roll up
• Decide the data quantity for user analysis or query
• Decide how data will be accessed
• Establish data granularity
• Estimate data warehouse size
• Determine the frequency for data refreshing
• Ascertain how information must be packaged
02/17/24 5
Information Package Diagram (Subject – Sales Analysis)
Dimensions
Time Locations Products Age
Periods Groups
Hierarchies
Lecture 3-6
Example business cases – Automobile
manufacturer
02/17/24 8
Example business cases – Automobile
manufacturer
Hierarchies and categories are included in the
information packages for each dimension.
02/17/24 9
Example business cases – Automobile
manufacturer
Key business metrics or facts
Measured Facts: Actual Sale Price, Options Price, Full Price, Dealer Add-ons,
Dealer Credits, Dealer Invoice, Down Payment, Proceeds, Finance
Lecture 3-11
Dimensional Model (Automaker sales)
PRODUCT
TIME
AUTO SALES
CUSTOMER
PAYMENT
METHOD
DEALER
02/17/24 12
Example business cases – Hotel Serena
02/17/24 13
Example business cases – Hotel Serena
02/17/24 14
Example business cases – Hotel Serena
1.Hotel: Hotel line, branch name, branch code, region, address, city, state,
Zip Code, manager, construction year, renovation year
2.Room: Room type, room size, number of beds, type of bed, maximum
occupants, suite, refrigerator, kitchenette
3.Time: Date, day of month, day of week, month, quarter, year, holiday
flag
02/17/24 15
Example business cases – Hotel Serena
1.Occupied rooms
2.Vacant rooms
3.Unavailable rooms
4.Revenue
02/17/24 16
Information Package Diagram (Hotel Serena)
Dimensions
Time Hotel Room type
Name
Month Branch Number of Beds
Code
Date Region Type of Bed
ORDER ORDER-LINE
STORE order_num (PK) order_num (PK) (FK)
store_ID (PK) customer_ID (FK) SKU (PK) (FK)
store_name store_ID (FK) Promotion_NUM (FK)
address clerk_ID (FK) dollars_sold
district date units_sold
floor_type dollars_cost
CLERK PROMOTION
clerk_id (PK) promotion_NUM (PK)
clerk_name promotion_name
clerk_grade price_type
ad_type
02/17/24 18
DIMENSIONAL
PRODUCT
TIME MODEL
product_key (SK)
time_key (SK)
SKU
SQL_date
description
day_of_week
brand
month FACT category
time_key (FK)
store_key (FK) CUSTOMER
STORE
clerk_key (FK) customer_key (SK)
store_key (SK)
product_key (FK) customer_ID
store_ID
customer_key (FK) customer_name
store_name
promotion_key (FK) purchase_profile
address
dollars_sold credit_profile
district
units_sold address
floor_type
dollars_cost
PROMOTION
CLERK promotion_key (SK)
clerk_key (SK) promotion_NUM
clerk_id promotion_name
clerk_name price_type
clerk_grade ad_type
02/17/24 19
Tutorials
The managing director of samona would like to
analyze the orders of their products per region per
customer for the last 3 years. The products have to
be supplied by the company suppliers. Therefore,
the products have to be normalized further to
provide information about the suppliers.
Design an information package that will show
the business requirements for the data
warehouse.
Design a snowflake dimensional model from
the information package
02/17/24 20
A data warehouse is based on a multidimensional
data model
A multidimensional database (MDDB) reflects the
multi-dimensional characteristics of data internally
Stores the data in a giant hypercube
Makes it easy for computer to locate any item of
interest.
02/17/24 21
Multi-dimensional Data
Sales volume as a function of
product, month, and region
Office Day
Month
02/17/24 22
Data Cube/Hypercube
Hypercubes summarise data into dimensions
Multidimensional Hypercubes enable managers to analyse
values at the intersection of these dimensions
Total annual sales
ct
2Qtr Date
du
Country
o
Pr
PC U.S.A
VC
sumR Canada
Mexico
sum
02/17/24 23
What are Data Cubes
Data Cubes are multidimensional data resources
Data Cubes allow you to look at complex data in a
simple format
Data Cubes allow you to analyze specific data
The data cube can therefore be defined as the
intersection of dimensions that provide some facts of
interest to the business
02/17/24 24
Parts of the Data Cube
Measures: Method of
Filters: Ability to look at only one
counting. How the
portion of a dimension. Example –
dimension is being counted.
GSFC instead of All Centers.
02/17/24 25
How to use a Data Cube
Data Cubes look like a simple spreadsheet
Aggregate Salary
02/17/24 31
Measures
Use the drop-down box to choose a measure
View Data As . . .
You may also choose to view the data as a number
or as a percentage