Designing and Implementing a
Datawarehousing(step1)
Chapter-4
Introduction to Dimensional Modeling
• Business question focus on measures that are aggregated by business
dimensions
• Measures are facts about the business
• Dimensions are ways in which the measures can be aggregated:
Product
Examples: Time Line
Sales revenue by salesperson
Profit by product line Quantity
Order quantity by product Region Revenue Customer
Cost by product Cost
Profit
Sales revenue by customer
Profit by region
Sales revenue by fiscal quarter
Sales
Product
person
Star Schemas
Schema is a logical description of the entire
database. It includes the name and description of
records of all record types including all associated
data-items and aggregates. Much like a database,
a data warehouse also requires to maintain a
schema. A database uses relational model, while a
data warehouse uses Star, Snowflake, and Fact
Constellation schema. In this chapter, we will
discuss the schemas used in a data warehouse.
Star Schemas(cont.)
Each dimension in a star schema is represented with
only one-dimension table.
This dimension table contains the set of attributes.
There is a fact table at the center. It contains the keys
to each of four dimensions.
The fact table also contains the attributes, namely
dollars sold and units sold.
The following diagram shows the sales data of a
company with respect to the four dimensions, namely
time, item, branch, and location
Star Schemas(cont..)
Star Schemas(cont.)
Note − Each dimension has only one dimension
table and each table holds a set of attributes.
For example, the location dimension table
contains the attribute set {location_key, street,
city, province_or_state,country}. This
constraint may cause data redundancy.
Star Schemas(cont..) DimSalesPerson
salesPersonkey
storeName
storeCity
Group related storeRegion
Dimensions into
Factorders
Dimension table. customerKey
DimCustomer salesPersonkey
Group related CustomerKey productkey DimDate
CustomerName Datekey
shippingAgentkey
Measures into Fact City
Datekey Year
Region
orderNo Quarter
Tables. lineItemNo Month
Relate fact tables to quantity day
Revenue
Dimension tables by Cost
profit
Using foreign keys. Dimproduct DimshipAgent
Productkey shippingAgentkey
productNam shippingAgentName
Star Schemas(cont.)