0% found this document useful (0 votes)
16 views18 pages

Dimensional Model

The document discusses the Dimensional Model, a data structure technique optimized for data warehousing, developed by Ralph Kimball, which includes 'fact' and 'dimension' tables. It outlines the elements of a dimensional model, steps for creating it, and the importance of accurately identifying business processes, grain, dimensions, and facts. Additionally, it describes the star and snowflake schemas used in dimensional modeling and provides rules for effective implementation.

Uploaded by

ortizjaime19644
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views18 pages

Dimensional Model

The document discusses the Dimensional Model, a data structure technique optimized for data warehousing, developed by Ralph Kimball, which includes 'fact' and 'dimension' tables. It outlines the elements of a dimensional model, steps for creating it, and the importance of accurately identifying business processes, grain, dimensions, and facts. Additionally, it describes the star and snowflake schemas used in dimensional modeling and provides rules for effective implementation.

Uploaded by

ortizjaime19644
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Lec 5

DIMENSIONAL MODEL
Data Warehouse _ Abdelrhman Elsamani

Dimensional Model
• A dimensional model is a data structure technique
optimized for Data warehousing tools. The concept of
Dimensional Modeling was developed by Ralph Kimball
and is comprised of "fact" and "dimension" tables.

• A Dimensional model is designed to read, summarize,


analyze numeric information like values, balances,
counts, weights, etc. in a data warehouse. In contrast,
relation models are optimized for addition, updating and
deletion of data in a real-time Online Transaction System.
Data Warehouse _ Abdelrhman Elsamani

• These dimensional and relational models have their


unique way of data storage that has specific advantages.

• For instance, in the relational mode, normalization and ER


models reduce redundancy in data. On the contrary,
dimensional model arranges data in such a way that it is
easier to retrieve information and generate reports.
Data Warehouse _ Abdelrhman Elsamani

Elements of Dimensional Data Model

• Fact
• Dimension
• Attributes
• Fact Table
• Dimension table
Data Warehouse _ Abdelrhman Elsamani

• Fact
Facts are the measurements/metrics or facts from your
business process. For a Sales business process, a
measurement would be quarterly sales number
• Dimension
Dimension provides the context surrounding a business
process event. In simple terms, they give who, what, where
of a fact. In the Sales business process, for the fact
quarterly sales number, dimensions would be
 Who – Customer Names
 Where – Location
 What – Product Name
In other words, a dimension is a window to view information
in the facts.
Data Warehouse _ Abdelrhman Elsamani

• Attributes
The Attributes are the various characteristics of the
dimension.
In the Location dimension, the attributes can be
 State
 Country
 Zip code etc.
Attributes are used to search, filter, or classify facts.
Dimension Tables contain Attributes
• Fact Table
A fact table is a primary table in a dimensional model.
• A Fact Table contains
• Measurements/facts
• Foreign key to dimension table
Data Warehouse _ Abdelrhman Elsamani

• Dimension table
 A dimension table contains dimensions of a fact.
 They are joined to fact table via a foreign key.
 Dimension tables are de-normalized tables.
 The Dimension Attributes are the various columns in a dimension
table
 Dimensions offers descriptive characteristics of the facts with the
help of their attributes
 No set limit set for given for number of dimensions
 The dimension can also contain one or more hierarchical
relationships
Data Warehouse _ Abdelrhman Elsamani

Steps of Dimensional Modeling


• The accuracy in creating your Dimensional modeling
determines the success of your data warehouse
implementation. Here are the steps to create Dimension
Model
• Identify Business Process
• Identify Grain (level of detail)
• Identify Dimensions
• Identify Facts
• Build Star
Data Warehouse _ Abdelrhman Elsamani

• The model should describe the Why, How much,


When/Where/Who and What of your business
process
Data Warehouse _ Abdelrhman Elsamani

Step 1: Identify the business process


• Identifying the actual business process a DW should
cover. This could be Marketing, Sales, HR, etc. as per the
data analysis needs of the organization. The selection of
the Business process also depends on the quality of data
available for that process. It is the most important step of
the Data Modeling process, and a failure here would have
cascading and irreparable defects.
• To describe the business process, you can use plain text
or use basic Business Process Modeling Notation
(BPMN) or Unified Modeling Language (UML).
Data Warehouse _ Abdelrhman Elsamani

Step 2: Identify the grain


• The Grain describes the level of detail for the business
problem/solution. It is the process of identifying the lowest level
of information for any table in your data warehouse. If a table
contains sales data for every day, then it should be daily
granularity. If a table contains total sales data for each month,
then it has monthly granularity.
• During this stage, you answer questions like
• Do we need to store all the available products or just a few
types of products? This decision is based on the business
processes selected for Data warehouse
• Do we store the product sale information on a monthly,
weekly, daily or hourly basis? This decision depends on the
nature of reports requested by executives
• How do the above two choices affect the database size?
Data Warehouse _ Abdelrhman Elsamani

• Example of Grain:
• wants to find the sales for specific products in different locations on a
daily basis.
• So, the grain is "product sale information by location by the day."
Data Warehouse _ Abdelrhman Elsamani

Step 3: Identify the dimensions


• Dimensions are nouns like date, store, inventory, etc.
These dimensions are where all the data should be
stored. For example, the date dimension may contain
data like a year, month and weekday.
• Example of Dimensions:
• wants to find the sales for specific products in different locations on
a daily basis.
• Dimensions: Product, Location and Time
• Attributes: For Product: Product key (Foreign Key), Name, Type,
Specifications
• Hierarchies: For Location: Country, State, City, Street Address,
Name
Data Warehouse _ Abdelrhman Elsamani

Step 4:Identify the Fact


• This step is co-associated with the business users of the
system because this is where they get access to data
stored in the data warehouse. Most of the fact table rows
are numerical values like price or cost per unit, etc.
• Example of Facts:
• wants to find the sales for specific products in different
locations on a daily basis.
• The fact here is Sum of Sales by product by location by
time.
Data Warehouse _ Abdelrhman Elsamani

Step 5: Build Schema


• In this step, you implement the Dimension Model. A
schema is nothing but the database structure
(arrangement of tables). There are two popular schemas
• Star Schema
• The star schema architecture is easy to design. It is called a star
schema because diagram resembles a star, with points radiating
from a center. The center of the star consists of the fact table, and
the points of the star is dimension tables.
• The fact tables in a star schema which is third normal form whereas
dimensional tables are de-normalized.
Data Warehouse _ Abdelrhman Elsamani

• Snowflake Schema
• The snowflake schema is an extension of the star schema. In a
snowflake schema, each dimension are normalized and connected
to more dimension tables.
Data Warehouse _ Abdelrhman Elsamani

Rules for Dimensional Modeling

 Load atomic data into dimensional structures.


 Build dimensional models around business processes.
 Need to ensure that every fact table has an associated
date dimension table.
 Ensure that all facts in a single fact table are at the same
grain or level of detail.
 It's essential to store report labels and filter domain values
in dimension tables
 Need to ensure that dimension tables use a surrogate key
 Continuously balance requirements and realities to deliver
business solution to support their decision-making
Data Warehouse _ Abdelrhman Elsamani

H. W
• Benefits of dimensional modeling

You might also like