SlideShare une entreprise Scribd logo
1  sur  22
Objectives
Understand how requirements definition determines
data design
Introduction of dimensional modeling /contrast with
E-R modeling
Basics of star schema
Contents of fact/dimension tables
Advantages of star schema for DW
Design decisions to be taken
Choosing the process:- deciding subjects
Choosing the grain
Identifying and confirming dimensions
Choosing the facts
Choosing the duration of the database
Dimensional modeling basics
Tips for combining data into
dimensional model
Provide best data access
Model should be query-centric
Model should be optimized for queries and analyses
Model should reveal the interactions between the
dimension and fact tables
There should be drilling down or rolling up along
dimension hierarchies
Entity-Relationship vs.
Dimensional Models
E-R DIAGRAM
One table per entity
Minimize data
redundancy
Optimize update
The Transaction
Processing Model
DIMENSIONAL MODEL
One fact table for data
organization
Maximize
understandability
Optimized for retrieval
The data warehousing
model
Query result
Dimension table
Contain information about a particular dimension.
Dimension table key
Table is wide
Textual attributes
Attributes not directly related
Not normalized
Drilling down, rolling up
Multiple hierarchies
Fewer number of records
Facts
Numeric measurements (values) that represent a
specific business aspect or activity
Stored in a fact table at the center of the star
scheme
Contains facts that are linked through their
dimensions
Can be computed or derived at run time
Updated periodically with data from operational
databases
Fact table
Contains primary information of the warehouse
Concatenated key
Data grain
Fully additive measures
Semi-additive measures(derived attributes)
Table deep, not wide
Sparse data
Degenerate dimensions(attributes which are neither
fact or a dimension)
Star schema for a retail chain
Time Dimension
Table
Time key
Year
Quarter
Month
Week
Date
Product
Dimension Table
Product key
Name
Brand
Category
Colour
Price
Customer
Dimension Table
Customer key
Name
Age
Income
Gender
Marital status
Store
Dimension
Table
Store key
Name
City
State
Op from year
Payment
Mode
Dimension
Table
Mode key
Payment mode
Sales Fact
Table
Time key
Product key
Customer key
Store key
Mode key
Actual sales
Forecast sales
Price
Discount
Star schema keys
Primary keys: should not be same as production
system
Surrogate keys: System generated sequence numbers
having no built-in meanings
Foreign keys: primary key of each dimension table
must be a foreign key in the fact table.
Updating the Dimension table
Dimension tables are non-volatile and mostly read-
only.
More rows are added to the Dimension tables over
time.
Changes to certain attributes of a row become
eminent at times.
There are many types of changes that affect the
dimension tables.
Type 1: Correction of errors
Usually relate to correction of errors in the source
systems.
E.g., spelling error in customer names; change of
names of customers;
There is no need to preserve the old values here.
The old value in the source system needs to be
discarded.
The changes made need not be preserved or noted.
Type 2: Preservation of history
True changes in the source systems.
E.g., change of marital status; change of address
There is a need to preserve history
This type of changes partition the warehouse
Every change for the same attribute must be
preserved.
Applying these changes:
Add a new dimension table row with new value of the
changed attribute
No changes are made to the existing row.
New rows are inserted with a new surrogate key.
Type 3: Tentative soft revision
Tentative changes in the source system
E.g., if an employee will get posted for a short period
to a different location
Need to keep track of history with old and new values
Used to compare performances across the transition
Applying these changes
An “old” field is added in the dimension table
Push existing value of attribute from “current” to “old”
Update the “current” field with the new value with
effective date
Large dimensions
Very deep(large number of rows)
Very wide(large number of attributes)
Have multiple hierarchies
Rapidly changing dimensions
Junk dimensions
Snowflake schema
A variation of the star schema, in which all or
some of the dimension tables may be normalized.
Eliminates redundancy
Generally used when a dimension table is wide.
Saves space
Complex querying is required.
Advantages and disadvantages
Advantages
Small savings in storage space
Normalized structures are easier to update and
maintain
Disadvantages
Schema is less intuitive
Browsing becomes difficult
Degraded query performance because of additional
joins

Contenu connexe

Tendances

Advanced Dimensional Modelling
Advanced Dimensional ModellingAdvanced Dimensional Modelling
Advanced Dimensional ModellingVincent Rainardi
 
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
 
Dimensional modeling primer
Dimensional modeling primerDimensional modeling primer
Dimensional modeling primerTerry Bunio
 
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
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modelingaksrauf
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingCode Mastery
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional ModelingSunita Sahu
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data modeljagdish_93
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6Prithwis Mukerjee
 
2 data warehouse life cycle golfarelli
2 data warehouse life cycle golfarelli2 data warehouse life cycle golfarelli
2 data warehouse life cycle golfarellitruongthuthuy47
 
Slowly changing dimension
Slowly changing dimension Slowly changing dimension
Slowly changing dimension Sunita Sahu
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modelingvivekjv
 
Steps To Build A Datawarehouse
Steps To Build A DatawarehouseSteps To Build A Datawarehouse
Steps To Build A DatawarehouseHendra Saputra
 
multi dimensional data model
multi dimensional data modelmulti dimensional data model
multi dimensional data modelmoni sindhu
 
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
 
Fact table design for data ware house
Fact table design for data ware houseFact table design for data ware house
Fact table design for data ware houseSayed Ahmed
 
E-R vs Starschema
E-R vs StarschemaE-R vs Starschema
E-R vs Starschemaguest862640
 

Tendances (20)

Advanced Dimensional Modelling
Advanced Dimensional ModellingAdvanced Dimensional Modelling
Advanced Dimensional Modelling
 
Star schema
Star schemaStar schema
Star schema
 
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
 
Dimensional modeling primer
Dimensional modeling primerDimensional modeling primer
Dimensional modeling primer
 
Designing the business process dimensional model
Designing the business process dimensional modelDesigning the business process dimensional model
Designing the business process dimensional model
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional Modeling
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data model
 
04 Dimensional Analysis - v6
04 Dimensional Analysis - v604 Dimensional Analysis - v6
04 Dimensional Analysis - v6
 
2 data warehouse life cycle golfarelli
2 data warehouse life cycle golfarelli2 data warehouse life cycle golfarelli
2 data warehouse life cycle golfarelli
 
Slowly changing dimension
Slowly changing dimension Slowly changing dimension
Slowly changing dimension
 
Business Intelligence: A Review
Business Intelligence: A ReviewBusiness Intelligence: A Review
Business Intelligence: A Review
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modeling
 
Steps To Build A Datawarehouse
Steps To Build A DatawarehouseSteps To Build A Datawarehouse
Steps To Build A Datawarehouse
 
multi dimensional data model
multi dimensional data modelmulti dimensional data model
multi dimensional data model
 
Star ,Snow and Fact-Constullation Schemas??
Star ,Snow and  Fact-Constullation Schemas??Star ,Snow and  Fact-Constullation Schemas??
Star ,Snow and Fact-Constullation Schemas??
 
Fact table design for data ware house
Fact table design for data ware houseFact table design for data ware house
Fact table design for data ware house
 
Star schema PPT
Star schema PPTStar schema PPT
Star schema PPT
 
E-R vs Starschema
E-R vs StarschemaE-R vs Starschema
E-R vs Starschema
 

Similaire à Dimensional Modeling

The Data Warehouse Lifecycle
The Data Warehouse LifecycleThe Data Warehouse Lifecycle
The Data Warehouse Lifecyclebartlowe
 
Modelado Dimensional 4 Etapas
Modelado Dimensional 4 EtapasModelado Dimensional 4 Etapas
Modelado Dimensional 4 EtapasRoberto Espinosa
 
LECTURE 7.ppt.pdf
LECTURE 7.ppt.pdfLECTURE 7.ppt.pdf
LECTURE 7.ppt.pdfcikajen791
 
05. Physical Data Specification Template
05. Physical Data Specification Template05. Physical Data Specification Template
05. Physical Data Specification TemplateAlan D. Duncan
 
Modelado Dimensional 4 etapas.ppt
Modelado Dimensional 4 etapas.pptModelado Dimensional 4 etapas.ppt
Modelado Dimensional 4 etapas.pptssuser39e08e
 
Intro to Data warehousing lecture 13
Intro to Data warehousing   lecture 13Intro to Data warehousing   lecture 13
Intro to Data warehousing lecture 13AnwarrChaudary
 
Export Data Model | SQL Database Modeler
Export Data Model | SQL Database ModelerExport Data Model | SQL Database Modeler
Export Data Model | SQL Database ModelerSQL DBM
 
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...Polish SQL Server User Group
 
Designing high performance datawarehouse
Designing high performance datawarehouseDesigning high performance datawarehouse
Designing high performance datawarehouseUday Kothari
 
Data Quality: A Raising Data Warehousing Concern
Data Quality: A Raising Data Warehousing ConcernData Quality: A Raising Data Warehousing Concern
Data Quality: A Raising Data Warehousing ConcernAmin Chowdhury
 
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!Caserta
 
Harnessing the value of big data analytics
Harnessing the value of big data analyticsHarnessing the value of big data analytics
Harnessing the value of big data analyticsSowmia Sathyan
 
(Lecture 4)Slowly Changing Dimensions.pdf
(Lecture 4)Slowly Changing Dimensions.pdf(Lecture 4)Slowly Changing Dimensions.pdf
(Lecture 4)Slowly Changing Dimensions.pdfMobeenMasoudi
 
Data ware dimension design
Data ware   dimension designData ware   dimension design
Data ware dimension designSayed Ahmed
 
Data ware dimension design
Data ware   dimension designData ware   dimension design
Data ware dimension designSayed Ahmed
 
IDW Lecture 21-Families of STAR schema.pptx
IDW Lecture 21-Families of STAR schema.pptxIDW Lecture 21-Families of STAR schema.pptx
IDW Lecture 21-Families of STAR schema.pptxIntisarAhmad5
 

Similaire à Dimensional Modeling (20)

The Data Warehouse Lifecycle
The Data Warehouse LifecycleThe Data Warehouse Lifecycle
The Data Warehouse Lifecycle
 
Modelado Dimensional 4 Etapas
Modelado Dimensional 4 EtapasModelado Dimensional 4 Etapas
Modelado Dimensional 4 Etapas
 
Dimensional Modelling
Dimensional ModellingDimensional Modelling
Dimensional Modelling
 
LECTURE 7.ppt.pdf
LECTURE 7.ppt.pdfLECTURE 7.ppt.pdf
LECTURE 7.ppt.pdf
 
Cs437 lecture 7-8
Cs437 lecture 7-8Cs437 lecture 7-8
Cs437 lecture 7-8
 
05. Physical Data Specification Template
05. Physical Data Specification Template05. Physical Data Specification Template
05. Physical Data Specification Template
 
Modelado Dimensional 4 etapas.ppt
Modelado Dimensional 4 etapas.pptModelado Dimensional 4 etapas.ppt
Modelado Dimensional 4 etapas.ppt
 
Intro to Data warehousing lecture 13
Intro to Data warehousing   lecture 13Intro to Data warehousing   lecture 13
Intro to Data warehousing lecture 13
 
Data Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptxData Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptx
 
Analytics 101
Analytics 101Analytics 101
Analytics 101
 
Export Data Model | SQL Database Modeler
Export Data Model | SQL Database ModelerExport Data Model | SQL Database Modeler
Export Data Model | SQL Database Modeler
 
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
 
Designing high performance datawarehouse
Designing high performance datawarehouseDesigning high performance datawarehouse
Designing high performance datawarehouse
 
Data Quality: A Raising Data Warehousing Concern
Data Quality: A Raising Data Warehousing ConcernData Quality: A Raising Data Warehousing Concern
Data Quality: A Raising Data Warehousing Concern
 
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!
Big Data Warehousing Meetup: Dimensional Modeling Still Matters!!!
 
Harnessing the value of big data analytics
Harnessing the value of big data analyticsHarnessing the value of big data analytics
Harnessing the value of big data analytics
 
(Lecture 4)Slowly Changing Dimensions.pdf
(Lecture 4)Slowly Changing Dimensions.pdf(Lecture 4)Slowly Changing Dimensions.pdf
(Lecture 4)Slowly Changing Dimensions.pdf
 
Data ware dimension design
Data ware   dimension designData ware   dimension design
Data ware dimension design
 
Data ware dimension design
Data ware   dimension designData ware   dimension design
Data ware dimension design
 
IDW Lecture 21-Families of STAR schema.pptx
IDW Lecture 21-Families of STAR schema.pptxIDW Lecture 21-Families of STAR schema.pptx
IDW Lecture 21-Families of STAR schema.pptx
 

Dernier

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 

Dernier (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 

Dimensional Modeling

  • 1.
  • 2. Objectives Understand how requirements definition determines data design Introduction of dimensional modeling /contrast with E-R modeling Basics of star schema Contents of fact/dimension tables Advantages of star schema for DW
  • 3. Design decisions to be taken Choosing the process:- deciding subjects Choosing the grain Identifying and confirming dimensions Choosing the facts Choosing the duration of the database
  • 5.
  • 6. Tips for combining data into dimensional model Provide best data access Model should be query-centric Model should be optimized for queries and analyses Model should reveal the interactions between the dimension and fact tables There should be drilling down or rolling up along dimension hierarchies
  • 7. Entity-Relationship vs. Dimensional Models E-R DIAGRAM One table per entity Minimize data redundancy Optimize update The Transaction Processing Model DIMENSIONAL MODEL One fact table for data organization Maximize understandability Optimized for retrieval The data warehousing model
  • 9. Dimension table Contain information about a particular dimension. Dimension table key Table is wide Textual attributes Attributes not directly related Not normalized Drilling down, rolling up Multiple hierarchies Fewer number of records
  • 10. Facts Numeric measurements (values) that represent a specific business aspect or activity Stored in a fact table at the center of the star scheme Contains facts that are linked through their dimensions Can be computed or derived at run time Updated periodically with data from operational databases
  • 11. Fact table Contains primary information of the warehouse Concatenated key Data grain Fully additive measures Semi-additive measures(derived attributes) Table deep, not wide Sparse data Degenerate dimensions(attributes which are neither fact or a dimension)
  • 12. Star schema for a retail chain Time Dimension Table Time key Year Quarter Month Week Date Product Dimension Table Product key Name Brand Category Colour Price Customer Dimension Table Customer key Name Age Income Gender Marital status Store Dimension Table Store key Name City State Op from year Payment Mode Dimension Table Mode key Payment mode Sales Fact Table Time key Product key Customer key Store key Mode key Actual sales Forecast sales Price Discount
  • 13. Star schema keys Primary keys: should not be same as production system Surrogate keys: System generated sequence numbers having no built-in meanings Foreign keys: primary key of each dimension table must be a foreign key in the fact table.
  • 14. Updating the Dimension table Dimension tables are non-volatile and mostly read- only. More rows are added to the Dimension tables over time. Changes to certain attributes of a row become eminent at times. There are many types of changes that affect the dimension tables.
  • 15. Type 1: Correction of errors Usually relate to correction of errors in the source systems. E.g., spelling error in customer names; change of names of customers; There is no need to preserve the old values here. The old value in the source system needs to be discarded. The changes made need not be preserved or noted.
  • 16. Type 2: Preservation of history True changes in the source systems. E.g., change of marital status; change of address There is a need to preserve history This type of changes partition the warehouse Every change for the same attribute must be preserved. Applying these changes: Add a new dimension table row with new value of the changed attribute No changes are made to the existing row. New rows are inserted with a new surrogate key.
  • 17. Type 3: Tentative soft revision Tentative changes in the source system E.g., if an employee will get posted for a short period to a different location Need to keep track of history with old and new values Used to compare performances across the transition Applying these changes An “old” field is added in the dimension table Push existing value of attribute from “current” to “old” Update the “current” field with the new value with effective date
  • 18. Large dimensions Very deep(large number of rows) Very wide(large number of attributes) Have multiple hierarchies Rapidly changing dimensions Junk dimensions
  • 19. Snowflake schema A variation of the star schema, in which all or some of the dimension tables may be normalized. Eliminates redundancy Generally used when a dimension table is wide. Saves space Complex querying is required.
  • 20.
  • 21.
  • 22. Advantages and disadvantages Advantages Small savings in storage space Normalized structures are easier to update and maintain Disadvantages Schema is less intuitive Browsing becomes difficult Degraded query performance because of additional joins