SlideShare uma empresa Scribd logo
1 de 44
Presented by Bryan Cafferky
Business Intelligence Consultant
BPC Global Solutions LLC
*** October 18th – Providence SQL Saturday! **
bryan256@msn.com
www.sql-fy.com
Kimball, Ralph, and Margy Ross. The Data Warehouse Toolkit. Wiley, Print. Corr, Lawrence. Agile Data Warehouse Design. DecisionOne Press, 2011. Print.
An example of a dimension…
A user might want to
group by store state.
An example of a fact table…
Sales amount is a fact.
An example of a fact table…
A dimension can contain
many dimension
attributes.
A fact table has facts (or
measures) and a key to
each related dimension.
• Dimensions relate directly to the fact table
and never to other dimensions .
• The dimensions are denormalized,
i.e. Sales_Person_Region does not have a
related region lookup table as an OLTP design
would likely have.
• Usually the dimension keys are NOT keys from
the source systems, rather they are generated
by the data warehouse load process and they
are called surrogate keys.
• The dimension attributes you define determine
the granularity called the grain of the facts, i.e.
how detailed are the measures.
• Warning! This is not a relational design so be
careful if you are an OLTP developer.
A SQL statement walks into a bar and sees
two tables. It approaches, and asks “may I join
you?”
Dimensions Facts
When a dimension relates to another dimension you have a snowflake.
• Beware! OLTP designers must
resist the urge to normalize by
creating snowflakes.
• Snowflakes cause a number of
performance and usability issues
and are rarely justified.
• Surrogate Keys – artificially created keys (usually integers) used only by the data warehouse to
uniquely identify a row in a dimension table.
• Grain – level of detail a fact row represents. For example, sale amount of a single
item at a given date/time by salespersonA in the Boston store.
• Conformed Dimension – Different source systems (CRM versus Sales) often have differences in the list of
dimension values they support. The CRM system may not have closed branches
but the sales system does. A consolidated list of dimension values that supports all
the source systems values is called a conformed dimension. Conformed
dimensions are critical for a successful data warehouse.
• Required to implement history of slowly changing dimensions.
• Avoids conflicts among backend application keys.
• Insulates the data warehouse from backend application changes.
• Different backend applications may use different columns as the dimension key.
• Note: Typically a surrogate key is just an integer.
1. Choose the business process
2. Declare the grain
3. Identify the dimensions
4. Identify the facts
1. Choose the business process
The basics in the design build on the actual business process which the data
warehouse should cover.Therefore the first step in the model is to describe the
business process which the model builds on.This could for instance be a sales
situation in a retail store.To describe the business process, one can choose to do
this in plain text or use basic Business Process Modeling Notation (BPMN) or
other design guides like the Unified Modeling Language (UML).
2. Declare the grain
The grain of the model is the exact description of what the dimensional model
should be focusing on.This could for instance be “An individual line item on a
customer slip from a retail store”.To clarify what the grain means, you should
pick the central process and describe it with one sentence. Furthermore the
grain (sentence) is what you are going to build your dimensions and fact table
from.You might find it necessary to go back to this step to alter the grain due to
new information gained on what your model is supposed to be able to deliver.
Identify the dimensions
3. Identify the dimensions
The dimensions must be defined within the grain from the second step of the 4-
step process. Dimensions are the foundation of the fact table, and is where the
data for the fact table is collected.Typically dimensions are nouns like date,
store, inventory etc.These dimensions are where all the data is stored. For
example, the date dimension could contain data such as year, month and
weekday.
4. Identify the facts
After defining the dimensions, the next step in the process is to make keys for
the fact table.This step is to identify the numeric facts that will populate each
fact table row.This step is closely related to the business users of the system,
since this is where they get access to data stored in the data warehouse.
Therefore most of the fact table rows are numerical, additive figures such as
quantity or cost per unit, etc.
1. Choose the business process
2. Declare the grain
3. Identify the dimensions
4. Identify the fact
Taken from The Data Warehouse Toolkit by Ralph Kimball and Margy Ross, Wiley Computer Publishing
Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press
Mary Jones buys 1 book for $22.50 entitled “Agile Data Warehouse Design” on
December 2, 2013 at 3:12 PM via Amazon.com using herVisa card to be delivered on
December 10, 2013 by UPS.
Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press
• How?
• What ?
• When?
• Where?
• Who?
• How Many?
• Why?
Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press
Mary Jones buys 1 book for $22.50 entitled “Agile Data Warehouse Design” on
December 2, 2013 at 3:12 PM via Amazon.com using herVisa card to be delivered on
December 10, 2013 by UPS.
How much? (Fact)
What
Who?
When?
Where? How?
Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press
Boston University orders 2,000 books for $10,000.00 using a Corporate Amazon
Account Membership discount with Amazon credit financed at 8% interest.
How much? (Fact)
What
Who?
When?
Where? How?
Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press
• Intuitive and natural for business users.
• Efficient way to get the required details.
• Provides jumping off point to get other information such as “Mary ordered via the internet. Are there other
outlets for buy products?” or “Mary is an individual, do you have groups or corporate customers?”
• Helps you to focus on a single process at a time.
Q:Why did the dimension take all day to take off
its suit and put on a pair of jeans?
A: It was a slowly-changing dimension
• Dimensional Modeling
• Facts and Dimensions
• KeyTerms: Surrogate Key, Grain, Conformed
Dimension, Bus Matrix
• The Star Schema
• Snow flaking Dimensions
• Slowly Changing Dimensions
• The Date Dimension

Mais conteúdo relacionado

Mais procurados

Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3Malik Alig
 
Designing the business process dimensional model
Designing the business process dimensional modelDesigning the business process dimensional model
Designing the business process dimensional modelGersiton Pila Challco
 
Data-Ed Online: Approaching Data Quality
Data-Ed Online: Approaching Data QualityData-Ed Online: Approaching Data Quality
Data-Ed Online: Approaching Data QualityDATAVERSITY
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional ModelingSunita Sahu
 
Basic Introduction of Data Warehousing from Adiva Consulting
Basic Introduction of  Data Warehousing from Adiva ConsultingBasic Introduction of  Data Warehousing from Adiva Consulting
Basic Introduction of Data Warehousing from Adiva Consultingadivasoft
 
Data lake benefits
Data lake benefitsData lake benefits
Data lake benefitsRicky Barron
 
Star ,Snow and Fact-Constullation Schemas??
Star ,Snow and  Fact-Constullation Schemas??Star ,Snow and  Fact-Constullation Schemas??
Star ,Snow and Fact-Constullation Schemas??Abdul Aslam
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse FundamentalsRashmi Bhat
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing conceptspcherukumalla
 
Big data architectures and the data lake
Big data architectures and the data lakeBig data architectures and the data lake
Big data architectures and the data lakeJames Serra
 
Data Warehousing 2016
Data Warehousing 2016Data Warehousing 2016
Data Warehousing 2016Kent Graziano
 
Building a modern data warehouse
Building a modern data warehouseBuilding a modern data warehouse
Building a modern data warehouseJames Serra
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureJames Serra
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesOsama Jomaa
 
Data Warehousing Trends, Best Practices, and Future Outlook
Data Warehousing Trends, Best Practices, and Future OutlookData Warehousing Trends, Best Practices, and Future Outlook
Data Warehousing Trends, Best Practices, and Future OutlookJames Serra
 
Advanced Dimensional Modelling
Advanced Dimensional ModellingAdvanced Dimensional Modelling
Advanced Dimensional ModellingVincent Rainardi
 
Introduction To Data Warehousing
Introduction To Data WarehousingIntroduction To Data Warehousing
Introduction To Data WarehousingAlex Meadows
 

Mais procurados (20)

Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3
 
Designing the business process dimensional model
Designing the business process dimensional modelDesigning the business process dimensional model
Designing the business process dimensional model
 
Data-Ed Online: Approaching Data Quality
Data-Ed Online: Approaching Data QualityData-Ed Online: Approaching Data Quality
Data-Ed Online: Approaching Data Quality
 
080827 abramson inmon vs kimball
080827 abramson   inmon vs kimball080827 abramson   inmon vs kimball
080827 abramson inmon vs kimball
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Basic Introduction of Data Warehousing from Adiva Consulting
Basic Introduction of  Data Warehousing from Adiva ConsultingBasic Introduction of  Data Warehousing from Adiva Consulting
Basic Introduction of Data Warehousing from Adiva Consulting
 
RDBMS vs NoSQL
RDBMS vs NoSQLRDBMS vs NoSQL
RDBMS vs NoSQL
 
Data lake benefits
Data lake benefitsData lake benefits
Data lake benefits
 
Star ,Snow and Fact-Constullation Schemas??
Star ,Snow and  Fact-Constullation Schemas??Star ,Snow and  Fact-Constullation Schemas??
Star ,Snow and Fact-Constullation Schemas??
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse Fundamentals
 
Introduction to Data Warehousing
Introduction to Data WarehousingIntroduction to Data Warehousing
Introduction to Data Warehousing
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing concepts
 
Big data architectures and the data lake
Big data architectures and the data lakeBig data architectures and the data lake
Big data architectures and the data lake
 
Data Warehousing 2016
Data Warehousing 2016Data Warehousing 2016
Data Warehousing 2016
 
Building a modern data warehouse
Building a modern data warehouseBuilding a modern data warehouse
Building a modern data warehouse
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse Architecture
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL Databases
 
Data Warehousing Trends, Best Practices, and Future Outlook
Data Warehousing Trends, Best Practices, and Future OutlookData Warehousing Trends, Best Practices, and Future Outlook
Data Warehousing Trends, Best Practices, and Future Outlook
 
Advanced Dimensional Modelling
Advanced Dimensional ModellingAdvanced Dimensional Modelling
Advanced Dimensional Modelling
 
Introduction To Data Warehousing
Introduction To Data WarehousingIntroduction To Data Warehousing
Introduction To Data Warehousing
 

Destaque

Dimensional Modeling Basic Concept with Example
Dimensional Modeling Basic Concept with ExampleDimensional Modeling Basic Concept with Example
Dimensional Modeling Basic Concept with ExampleSajjad Zaheer
 
Dimensional data model
Dimensional data modelDimensional data model
Dimensional data modelVnktp1
 
A 3 dimensional data model in hbase for large time-series dataset-20120915
A 3 dimensional data model in hbase for large time-series dataset-20120915A 3 dimensional data model in hbase for large time-series dataset-20120915
A 3 dimensional data model in hbase for large time-series dataset-20120915Dan Han
 
Informatica Command Line Statements
Informatica Command Line StatementsInformatica Command Line Statements
Informatica Command Line Statementsmnsk80
 
Dimensional Modelling Session 2
Dimensional Modelling Session 2Dimensional Modelling Session 2
Dimensional Modelling Session 2akitda
 
Dimensional modeling primer
Dimensional modeling primerDimensional modeling primer
Dimensional modeling primerTerry Bunio
 
Data warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-designData warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-designSarita Kataria
 
Kimball Vs Inmon
Kimball Vs InmonKimball Vs Inmon
Kimball Vs Inmonguest2308b5
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingCode Mastery
 
ETIS09 - Data Quality: Common Problems & Checks - Presentation
ETIS09 -  Data Quality: Common Problems & Checks - PresentationETIS09 -  Data Quality: Common Problems & Checks - Presentation
ETIS09 - Data Quality: Common Problems & Checks - PresentationDavid Walker
 
Hadoop Integration into Data Warehousing Architectures
Hadoop Integration into Data Warehousing ArchitecturesHadoop Integration into Data Warehousing Architectures
Hadoop Integration into Data Warehousing ArchitecturesHumza Naseer
 
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data Hubs
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data HubsWhat Comes After The Star Schema? Dimensional Modeling For Enterprise Data Hubs
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data HubsCloudera, Inc.
 
Data warehouse inmon versus kimball 2
Data warehouse inmon versus kimball 2Data warehouse inmon versus kimball 2
Data warehouse inmon versus kimball 2Mike Frampton
 
Difference between ER-Modeling and Dimensional Modeling
Difference between ER-Modeling and Dimensional ModelingDifference between ER-Modeling and Dimensional Modeling
Difference between ER-Modeling and Dimensional ModelingAbdul Aslam
 
Hadoop and Enterprise Data Warehouse
Hadoop and Enterprise Data WarehouseHadoop and Enterprise Data Warehouse
Hadoop and Enterprise Data WarehouseDataWorks Summit
 
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop Professionals
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop ProfessionalsBest Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop Professionals
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop ProfessionalsCloudera, Inc.
 
Dimensional data modeling
Dimensional data modelingDimensional data modeling
Dimensional data modelingAdam Hutson
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modelingvivekjv
 
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 MillionHow One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 MillionDataWorks Summit
 

Destaque (20)

Dimensional Modeling Basic Concept with Example
Dimensional Modeling Basic Concept with ExampleDimensional Modeling Basic Concept with Example
Dimensional Modeling Basic Concept with Example
 
Dimensional data model
Dimensional data modelDimensional data model
Dimensional data model
 
A 3 dimensional data model in hbase for large time-series dataset-20120915
A 3 dimensional data model in hbase for large time-series dataset-20120915A 3 dimensional data model in hbase for large time-series dataset-20120915
A 3 dimensional data model in hbase for large time-series dataset-20120915
 
Informatica Command Line Statements
Informatica Command Line StatementsInformatica Command Line Statements
Informatica Command Line Statements
 
Dimensional Modelling Session 2
Dimensional Modelling Session 2Dimensional Modelling Session 2
Dimensional Modelling Session 2
 
Dimensional modeling primer
Dimensional modeling primerDimensional modeling primer
Dimensional modeling primer
 
Data warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-designData warehouse-dimensional-modeling-and-design
Data warehouse-dimensional-modeling-and-design
 
Kimball Vs Inmon
Kimball Vs InmonKimball Vs Inmon
Kimball Vs Inmon
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional Modeling
 
ETIS09 - Data Quality: Common Problems & Checks - Presentation
ETIS09 -  Data Quality: Common Problems & Checks - PresentationETIS09 -  Data Quality: Common Problems & Checks - Presentation
ETIS09 - Data Quality: Common Problems & Checks - Presentation
 
Hadoop Integration into Data Warehousing Architectures
Hadoop Integration into Data Warehousing ArchitecturesHadoop Integration into Data Warehousing Architectures
Hadoop Integration into Data Warehousing Architectures
 
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data Hubs
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data HubsWhat Comes After The Star Schema? Dimensional Modeling For Enterprise Data Hubs
What Comes After The Star Schema? Dimensional Modeling For Enterprise Data Hubs
 
Inmon & kimball method
Inmon & kimball methodInmon & kimball method
Inmon & kimball method
 
Data warehouse inmon versus kimball 2
Data warehouse inmon versus kimball 2Data warehouse inmon versus kimball 2
Data warehouse inmon versus kimball 2
 
Difference between ER-Modeling and Dimensional Modeling
Difference between ER-Modeling and Dimensional ModelingDifference between ER-Modeling and Dimensional Modeling
Difference between ER-Modeling and Dimensional Modeling
 
Hadoop and Enterprise Data Warehouse
Hadoop and Enterprise Data WarehouseHadoop and Enterprise Data Warehouse
Hadoop and Enterprise Data Warehouse
 
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop Professionals
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop ProfessionalsBest Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop Professionals
Best Practices for the Hadoop Data Warehouse: EDW 101 for Hadoop Professionals
 
Dimensional data modeling
Dimensional data modelingDimensional data modeling
Dimensional data modeling
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modeling
 
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 MillionHow One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
How One Company Offloaded Data Warehouse ETL To Hadoop and Saved $30 Million
 

Semelhante a Dimensional Modeling

BI_LECTURE_4-2021.pptx
BI_LECTURE_4-2021.pptxBI_LECTURE_4-2021.pptx
BI_LECTURE_4-2021.pptxhajon27910
 
An introduction to data warehousing
An introduction to data warehousingAn introduction to data warehousing
An introduction to data warehousingShahed Khalili
 
Business Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemBusiness Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemKiran kumar
 
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docx
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docxDATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docx
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docxwhittemorelucilla
 
Basics+of+Datawarehousing
Basics+of+DatawarehousingBasics+of+Datawarehousing
Basics+of+Datawarehousingtheextraaedge
 
INFORMATICA EASY LEARNING ONLINE TRAINING
INFORMATICA EASY LEARNING ONLINE TRAININGINFORMATICA EASY LEARNING ONLINE TRAINING
INFORMATICA EASY LEARNING ONLINE TRAININGZaranTech LLC
 
IBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNIBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNabclearnn
 
Introduction to Big Data Analytics
Introduction to Big Data AnalyticsIntroduction to Big Data Analytics
Introduction to Big Data AnalyticsUtkarsh Sharma
 
Data warehousing interview questions
Data warehousing interview questionsData warehousing interview questions
Data warehousing interview questionsSatyam Jaiswal
 
Data Warehousing for students educationpptx
Data Warehousing for students educationpptxData Warehousing for students educationpptx
Data Warehousing for students educationpptxjainyshah20
 
Intro to Data warehousing lecture 15
Intro to Data warehousing   lecture 15Intro to Data warehousing   lecture 15
Intro to Data warehousing lecture 15AnwarrChaudary
 
A Data Warehouse And Business Intelligence Application
A Data Warehouse And Business Intelligence ApplicationA Data Warehouse And Business Intelligence Application
A Data Warehouse And Business Intelligence ApplicationKate Subramanian
 
Introduction to Dimesional Modelling
Introduction to Dimesional ModellingIntroduction to Dimesional Modelling
Introduction to Dimesional ModellingAshish Chandwani
 
Data warehouse project on retail store
Data warehouse project on retail storeData warehouse project on retail store
Data warehouse project on retail storeSiddharth Chaudhary
 
The Data Warehouse Essays
The Data Warehouse EssaysThe Data Warehouse Essays
The Data Warehouse EssaysMelissa Moore
 

Semelhante a Dimensional Modeling (20)

BI_LECTURE_4-2021.pptx
BI_LECTURE_4-2021.pptxBI_LECTURE_4-2021.pptx
BI_LECTURE_4-2021.pptx
 
An introduction to data warehousing
An introduction to data warehousingAn introduction to data warehousing
An introduction to data warehousing
 
Business Intelligence Data Warehouse System
Business Intelligence Data Warehouse SystemBusiness Intelligence Data Warehouse System
Business Intelligence Data Warehouse System
 
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docx
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docxDATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docx
DATABASE SYSTEMS DEVELOPMENT & IMPLEMENTATION PLAN1DATABASE SYS.docx
 
Basics+of+Datawarehousing
Basics+of+DatawarehousingBasics+of+Datawarehousing
Basics+of+Datawarehousing
 
Bi overview
Bi overviewBi overview
Bi overview
 
Star schema
Star schemaStar schema
Star schema
 
INFORMATICA EASY LEARNING ONLINE TRAINING
INFORMATICA EASY LEARNING ONLINE TRAININGINFORMATICA EASY LEARNING ONLINE TRAINING
INFORMATICA EASY LEARNING ONLINE TRAINING
 
Datawarehouse
DatawarehouseDatawarehouse
Datawarehouse
 
IBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARNIBM Cognos tutorial - ABC LEARN
IBM Cognos tutorial - ABC LEARN
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Introduction to Big Data Analytics
Introduction to Big Data AnalyticsIntroduction to Big Data Analytics
Introduction to Big Data Analytics
 
Data warehousing interview questions
Data warehousing interview questionsData warehousing interview questions
Data warehousing interview questions
 
Data Warehousing for students educationpptx
Data Warehousing for students educationpptxData Warehousing for students educationpptx
Data Warehousing for students educationpptx
 
Intro to Data warehousing lecture 15
Intro to Data warehousing   lecture 15Intro to Data warehousing   lecture 15
Intro to Data warehousing lecture 15
 
Afdal
AfdalAfdal
Afdal
 
A Data Warehouse And Business Intelligence Application
A Data Warehouse And Business Intelligence ApplicationA Data Warehouse And Business Intelligence Application
A Data Warehouse And Business Intelligence Application
 
Introduction to Dimesional Modelling
Introduction to Dimesional ModellingIntroduction to Dimesional Modelling
Introduction to Dimesional Modelling
 
Data warehouse project on retail store
Data warehouse project on retail storeData warehouse project on retail store
Data warehouse project on retail store
 
The Data Warehouse Essays
The Data Warehouse EssaysThe Data Warehouse Essays
The Data Warehouse Essays
 

Dimensional Modeling

  • 1. Presented by Bryan Cafferky Business Intelligence Consultant BPC Global Solutions LLC *** October 18th – Providence SQL Saturday! ** bryan256@msn.com www.sql-fy.com
  • 2.
  • 3. Kimball, Ralph, and Margy Ross. The Data Warehouse Toolkit. Wiley, Print. Corr, Lawrence. Agile Data Warehouse Design. DecisionOne Press, 2011. Print.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. An example of a dimension… A user might want to group by store state.
  • 9. An example of a fact table… Sales amount is a fact.
  • 10. An example of a fact table… A dimension can contain many dimension attributes. A fact table has facts (or measures) and a key to each related dimension.
  • 11. • Dimensions relate directly to the fact table and never to other dimensions . • The dimensions are denormalized, i.e. Sales_Person_Region does not have a related region lookup table as an OLTP design would likely have. • Usually the dimension keys are NOT keys from the source systems, rather they are generated by the data warehouse load process and they are called surrogate keys. • The dimension attributes you define determine the granularity called the grain of the facts, i.e. how detailed are the measures. • Warning! This is not a relational design so be careful if you are an OLTP developer.
  • 12. A SQL statement walks into a bar and sees two tables. It approaches, and asks “may I join you?”
  • 14. When a dimension relates to another dimension you have a snowflake. • Beware! OLTP designers must resist the urge to normalize by creating snowflakes. • Snowflakes cause a number of performance and usability issues and are rarely justified.
  • 15. • Surrogate Keys – artificially created keys (usually integers) used only by the data warehouse to uniquely identify a row in a dimension table. • Grain – level of detail a fact row represents. For example, sale amount of a single item at a given date/time by salespersonA in the Boston store. • Conformed Dimension – Different source systems (CRM versus Sales) often have differences in the list of dimension values they support. The CRM system may not have closed branches but the sales system does. A consolidated list of dimension values that supports all the source systems values is called a conformed dimension. Conformed dimensions are critical for a successful data warehouse.
  • 16. • Required to implement history of slowly changing dimensions. • Avoids conflicts among backend application keys. • Insulates the data warehouse from backend application changes. • Different backend applications may use different columns as the dimension key. • Note: Typically a surrogate key is just an integer.
  • 17.
  • 18. 1. Choose the business process 2. Declare the grain 3. Identify the dimensions 4. Identify the facts
  • 19. 1. Choose the business process The basics in the design build on the actual business process which the data warehouse should cover.Therefore the first step in the model is to describe the business process which the model builds on.This could for instance be a sales situation in a retail store.To describe the business process, one can choose to do this in plain text or use basic Business Process Modeling Notation (BPMN) or other design guides like the Unified Modeling Language (UML).
  • 20. 2. Declare the grain The grain of the model is the exact description of what the dimensional model should be focusing on.This could for instance be “An individual line item on a customer slip from a retail store”.To clarify what the grain means, you should pick the central process and describe it with one sentence. Furthermore the grain (sentence) is what you are going to build your dimensions and fact table from.You might find it necessary to go back to this step to alter the grain due to new information gained on what your model is supposed to be able to deliver. Identify the dimensions
  • 21. 3. Identify the dimensions The dimensions must be defined within the grain from the second step of the 4- step process. Dimensions are the foundation of the fact table, and is where the data for the fact table is collected.Typically dimensions are nouns like date, store, inventory etc.These dimensions are where all the data is stored. For example, the date dimension could contain data such as year, month and weekday.
  • 22. 4. Identify the facts After defining the dimensions, the next step in the process is to make keys for the fact table.This step is to identify the numeric facts that will populate each fact table row.This step is closely related to the business users of the system, since this is where they get access to data stored in the data warehouse. Therefore most of the fact table rows are numerical, additive figures such as quantity or cost per unit, etc.
  • 23. 1. Choose the business process 2. Declare the grain 3. Identify the dimensions 4. Identify the fact
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Taken from The Data Warehouse Toolkit by Ralph Kimball and Margy Ross, Wiley Computer Publishing
  • 29.
  • 30. Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press Mary Jones buys 1 book for $22.50 entitled “Agile Data Warehouse Design” on December 2, 2013 at 3:12 PM via Amazon.com using herVisa card to be delivered on December 10, 2013 by UPS.
  • 31. Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press • How? • What ? • When? • Where? • Who? • How Many? • Why?
  • 32. Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press Mary Jones buys 1 book for $22.50 entitled “Agile Data Warehouse Design” on December 2, 2013 at 3:12 PM via Amazon.com using herVisa card to be delivered on December 10, 2013 by UPS. How much? (Fact) What Who? When? Where? How?
  • 33. Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press Boston University orders 2,000 books for $10,000.00 using a Corporate Amazon Account Membership discount with Amazon credit financed at 8% interest. How much? (Fact) What Who? When? Where? How?
  • 34. Taken from Agile Data Warehouse Design by Lawrence Corr, DecisionOne Press • Intuitive and natural for business users. • Efficient way to get the required details. • Provides jumping off point to get other information such as “Mary ordered via the internet. Are there other outlets for buy products?” or “Mary is an individual, do you have groups or corporate customers?” • Helps you to focus on a single process at a time.
  • 35. Q:Why did the dimension take all day to take off its suit and put on a pair of jeans? A: It was a slowly-changing dimension
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. • Dimensional Modeling • Facts and Dimensions • KeyTerms: Surrogate Key, Grain, Conformed Dimension, Bus Matrix • The Star Schema • Snow flaking Dimensions • Slowly Changing Dimensions • The Date Dimension