Data Warehousing: Engr. Madeha Mushtaq Department of Computer Science Iqra National University
Data Warehousing: Engr. Madeha Mushtaq Department of Computer Science Iqra National University
Data Warehousing: Engr. Madeha Mushtaq Department of Computer Science Iqra National University
LECTURE 6
• Some Observations:
• All tables look-alike, as a consequence it is difficult to identify:
• Which table is more important ?
• Which is the largest?
• Which tables contain numerical measurements of the business?
• Which table contain nearly static descriptive attributes?
NEED FOR DIMENSIONAL MODELING
3 2 5
2 5 4
NEED FOR DIMENSIONAL MODELING
ER DM
Constituted to optimize DSS query
Constituted to optimize OLTP performance.
performance.
• To get a good grasp of the dimensional nature of business data, let us look
at an example:
• Figure below shows the analysis of sales units along the three business
dimensions of product, time, and geography.
DIMENSIONAL NATURE OF BUSINESS DATA
• For the supermarket chain, the measurements that are analyzed are the
sales units.
• These are analyzed along four business dimensions.
• For the insurance company, we would want to analyze the claims data by
agent, individual claim, time, insured party, individual policy, and status of
the claim.
• For the example of the airlines company the business dimensions are time,
customer, specific flight, fare class, airport, and frequent flyer status.
EXAMPLES OF BUSINESS DIMENSIONS
Facts
Dimensions
Fact Table
Calendar_Date
Time_of_Day
Dim Account _No
ATM_Location
Transaction_Rs
Transaction_Type
Multivalued Dimensions
PROCESS OF DIMENSIONAL MODELING
• Let us look at an example for analyzing sales for a certain business as shown in
figure:
DIMENSIONAL MODELING
• In the automaker sales figure, we can see the facts at the bottom.
• All these facts will form the fact table as shown in the figure.
• The fact table gets its name from the subject for analysis; in this case, it is
automaker sales.
• Each fact item or measurement goes into the fact table as an attribute for
automaker sales.
DIMENSIONAL MODELING
• Let us take one more example. In this case, we want to come up with an
information package for a hotel chain.
• The subject in this case is hotel occupancy.
• We want to analyze occupancy of the rooms in the various branches of the
hotel chain.
• We want to analyze the occupancy by individual hotels and by room types.
• So hotel and room type are critical business dimensions for the analysis.
• As in the other case, we also need to include the time dimension.
DIMENSIONAL MODELING
DIMENSIONAL MODELING
• Here are some of the criteria for combining the tables into a dimensional
model:
• The model should provide the best data access.
• The whole model must be query-centric.
• It must be optimized for queries and analyses.
• The model must show that the dimension tables interact with the fact table.
• It should also be structured in such a way that every dimension can
interact equally with the fact table.
END OF SLIDES