SlideShare a Scribd company logo
1 of 26
SOFTWARE/WEB/MOBILE/DATABASE ARCHITECT, ENGINEER, AND DEVELOPER
TORONTO, CANADA
HTTP://SAYED.JUSTETC.NET
HTTP://WWW.JUSTETC.NET
Sayed Ahmed
Data Warehouse Fact Table Design
Logical Design of a Data Warehouse
 This is a video just for the sake of a video
 I will not explain anything
 Just will walk through on some presentation
slides on Data Warehouse
OUR SERVICES
 Free Training and Educational Services
 Training and Education in Bangla:
 Bangla.SaLearningSchool.com
 Training and Education in English:
 www.SaLearningSchool.com
 English.SaLearningSchool.com
 http://sitestree.com
 Ask a question and get answers:
 Ask.JustEtc.net
FACT TABLE DESIGN
 Fact Table Design Topics
 Define fact table column types
 Understand the additivity of a measure
 i.e. for measure column type
 Handle many-to-many relationships in a Star
schema
FACT TABLE COLUMN TYPES
 Fact Table Column Types
 Foreign keys
 Measures
 Lineage columns (optional)
 Business key columns
 from the primary source table (optional)
 Surrogate keys
FACT TABLE COLUMNS - MEASURE
 Measure Column Type
 Measure columns help with measurements
 useful for a specific business process
 Measures columns are usually numeric
 And can be aggregated
 Measure columns store values that are of
interest to businesses such as
 sales amount, order quantity, and discount amount
MEASURES
 Fact tables - Measures
 Collection of measurements on a specific
aspects of business
 Measure columns
 sales amount, order quantity, and discount
amount.
FACT TABLE COLUMNS – FOREIGN KEY
 Foreign Key – Column Type
 These are the columns as coming from
Dimension Tables
 Are the primary keys of Dimension Tables
FACT TABLE COLUMNS – SURROGATE KEYS
 Surrogate Key
 Usually will comes from the primary dimension
table (primary for the current fact table)
 Usually one or two columns in a fact table are
surrogate keys

SURROGATE KEYS FOR FACT TABLES
OrderId and LineItemId are the
surrogate keys as coming from the
primary Source Order details table
OrderId and LineItemId columns will help
For quick comparisons with source data
Surrogate keys are not a must in fact tables;
however, they help
Must read:
http://www.kimballgroup.com/2006/07/d
esign-tip-81-fact-table-surrogate-key/
LINEAGE COLUMNS IN FACT TABLES
 Lineage columns
 Just as with dimension tables, these are strictly
for auditing purposes
 References:
 https://upsearch.com/implementing-a-data-
warehouse-fact-tables/
ADDITIVITY OF MEASURES
 The primary purpose of Data warehouse is reporting,
and forecasting
 Many times reports are aggregations such as sum
 Example: sales by quarter, by region, by product type
 Many reports are usually aggregations
 Hence, fact tables will have some columns to assist
with that measures and aggregations for reporting
 These are the measures columns as we discussed
before
 The measures that you add will help in how you want
to do the measures and reporting
TYPES OF ADDITIVITY OF MEASURES
 Types of Additivity of Measures
 additive measures
 Semi-additive measures
 non-additive measures

ADDITIVE, SEMI-ADDITIVE MEASURES
 Additive
 If a measure can be summed across all dimensions
 Semi-additive
 Sometimes, we can sum a measure across all
dimensions except for time
 such as account balance
 We can’t sum the account balance across the time
dimension
 We would need to do something like take the average
instead
 or simply use the last value
 Measures like this are called semi-additive measures
NON-ADDITIVE MEASURES
 Some measures can’t ever be summed
 These are called non-additive measures
 Such as discount percentages and prices
 These are the non-additive measures
ADDITIVITY OF MEASURES IN SSAS
 SSAS has support for semi-additive and non-
additive measures
 The SSAS database model
 Business Intelligence Semantic Model (BISM).
 BISM includes way more additional metadata
than RDBMS
 SSAS has two types of storage
 dimensional and
 tabular
SSAS AND ADDITIVITY OF MEASURES
 Tabular storage works through tables like a
data warehouse does
 quicker to develop
 The dimensional model
 more properly represents a cube
 The dimensional model includes
 even more metadata than the tabular model
SSAS AND ADDITIVITY OF MEASURES
 In BISM dimensional processing
 SSAS offers semi-additive aggregate functions
out of the box
 For example,
 SSAS offers the LastNonEmpty aggregate
function
 which properly uses the SUM aggregate function
across all dimensions but time
 and defines the last known value as the aggregate
over time
SSAS AND ADDITIVITY OF MEASURES
 In the BISM tabular model
 you use the Data Analysis Expression (DAX)
language
 The DAX language includes functions that let
you build semi-additive expressions quite quickly
as well
MANY TO MANY RELATIONSHIPS IN DATA WAREHOUSE
 RDBMS Many to Many Relationship
MANY TO MANY IN RDBMS AND DW
 RDBMS Model as above image is ok, Because
 Every internet sales will have multiple reasons
 Every reasons will have multiple internet sales
 However, data warehouse has issues with such
modeling
 because when using tools to build reporting the fact
table is expected to be on the many side
 In the above picture, fact table is on the one side
 In SSAS reporting, many times, we use tools that
build MDX queries that expect the schema to be
perfectly in star or snow-flake schema
HOW CAN WE RESOLVE ...
 In SSAS with a BISM dimensional model
 you can solve the problem by creating an
intermediate dimension between both fact tables
 Picture as below
MANY TO MANY RELATIONSHIP
DW MANY TO MANY
 You create it from the primary key of
theFactInternetSales table
 DimFactInternetSales.
 put it on the “one” side of the relationships with both fact
tables
 Now, both fact tables are always on the “many”
side of any relationship
 However, the relationship between
theFactInternetSales and the
new DimFactInternetSales dimension
 is de facto one to one
THANK YOU
?
http://ask.justetc.net
OUR SERVICES
 Free Training and Educational Services
 Training and Education in Bangla:
 Bangla.SaLearningSchool.com
 Training and Education in English:
 www.SaLearningSchool.com
 English.SaLearningSchool.com
 http://sitestree.com
 Ask a question and get answers:
 Ask.JustEtc.net

More Related Content

What's hot

SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11SavvyData
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX PatternsEric Bragas
 
Data Analysis & Visualization using MS. Excel
Data Analysis & Visualization using MS. ExcelData Analysis & Visualization using MS. Excel
Data Analysis & Visualization using MS. ExcelFrehiwot Mulugeta
 
Data analysis and Data Visualization using Microsoft Excel
Data analysis and Data Visualization using Microsoft ExcelData analysis and Data Visualization using Microsoft Excel
Data analysis and Data Visualization using Microsoft ExcelFrehiwot Mulugeta
 
Charts in excel 2007
Charts in excel 2007Charts in excel 2007
Charts in excel 2007bloftinsaisd
 
Tableau online training
Tableau online trainingTableau online training
Tableau online trainingsuresh
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excelFrehiwot Mulugeta
 
Introduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsIntroduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsKingston Tagoe
 
Creating Chart
Creating ChartCreating Chart
Creating Charttieny8085
 
9 Amazingly Simple Data Presentation Tips
9 Amazingly Simple Data Presentation Tips9 Amazingly Simple Data Presentation Tips
9 Amazingly Simple Data Presentation TipsSketchBubble
 
Common Msisdn Resource Number Management
Common Msisdn Resource   Number ManagementCommon Msisdn Resource   Number Management
Common Msisdn Resource Number ManagementRoman Agaev
 

What's hot (17)

Introduction to DAX Language
Introduction to DAX LanguageIntroduction to DAX Language
Introduction to DAX Language
 
SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX Patterns
 
DAX (Data Analysis eXpressions) from Zero to Hero
DAX (Data Analysis eXpressions) from Zero to HeroDAX (Data Analysis eXpressions) from Zero to Hero
DAX (Data Analysis eXpressions) from Zero to Hero
 
Data Analysis & Visualization using MS. Excel
Data Analysis & Visualization using MS. ExcelData Analysis & Visualization using MS. Excel
Data Analysis & Visualization using MS. Excel
 
Graphing
GraphingGraphing
Graphing
 
Data analysis and Data Visualization using Microsoft Excel
Data analysis and Data Visualization using Microsoft ExcelData analysis and Data Visualization using Microsoft Excel
Data analysis and Data Visualization using Microsoft Excel
 
Charts in excel 2007
Charts in excel 2007Charts in excel 2007
Charts in excel 2007
 
Tableau online training
Tableau online trainingTableau online training
Tableau online training
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excel
 
Introduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsIntroduction to Basic Spreadsheets
Introduction to Basic Spreadsheets
 
Creating Chart
Creating ChartCreating Chart
Creating Chart
 
9 Amazingly Simple Data Presentation Tips
9 Amazingly Simple Data Presentation Tips9 Amazingly Simple Data Presentation Tips
9 Amazingly Simple Data Presentation Tips
 
Dax en
Dax enDax en
Dax en
 
Computer midterms
Computer midtermsComputer midterms
Computer midterms
 
SPSS
SPSSSPSS
SPSS
 
Common Msisdn Resource Number Management
Common Msisdn Resource   Number ManagementCommon Msisdn Resource   Number Management
Common Msisdn Resource Number Management
 

Similar to Data Warehouse Fact Table Design

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
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional ModelingSunita Sahu
 
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 ware house design
Data ware house designData ware house design
Data ware house designSayed Ahmed
 
Data ware house design
Data ware house designData ware house design
Data ware house designSayed Ahmed
 
Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)Doria Hamelryk
 
Case study: Implementation of dimension table and fact table
Case study: Implementation of dimension table and fact tableCase study: Implementation of dimension table and fact table
Case study: Implementation of dimension table and fact tablechirag patil
 
Building Bi Dashboards With SAS Gauges and SAS BI Portal
Building Bi Dashboards With SAS Gauges and SAS BI PortalBuilding Bi Dashboards With SAS Gauges and SAS BI Portal
Building Bi Dashboards With SAS Gauges and SAS BI Portalsimienc
 
Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3Malik Alig
 
The Data Warehouse Lifecycle
The Data Warehouse LifecycleThe Data Warehouse Lifecycle
The Data Warehouse Lifecyclebartlowe
 
Introduction to Dimesional Modelling
Introduction to Dimesional ModellingIntroduction to Dimesional Modelling
Introduction to Dimesional ModellingAshish Chandwani
 
Teradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional ModelsTeradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional Modelspepeborja
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfoliormatejek
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdfJoao Vaz
 

Similar to Data Warehouse Fact Table Design (20)

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
 
Getting power bi
Getting power biGetting power bi
Getting power bi
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Designing the business process dimensional model
Designing the business process dimensional modelDesigning the business process dimensional model
Designing the business process dimensional model
 
Data ware house design
Data ware house designData ware house design
Data ware house design
 
Data ware house design
Data ware house designData ware house design
Data ware house design
 
Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)Découverte d'Einstein Analytics (Tableau CRM)
Découverte d'Einstein Analytics (Tableau CRM)
 
Case study: Implementation of dimension table and fact table
Case study: Implementation of dimension table and fact tableCase study: Implementation of dimension table and fact table
Case study: Implementation of dimension table and fact table
 
Building Bi Dashboards With SAS Gauges and SAS BI Portal
Building Bi Dashboards With SAS Gauges and SAS BI PortalBuilding Bi Dashboards With SAS Gauges and SAS BI Portal
Building Bi Dashboards With SAS Gauges and SAS BI Portal
 
Star schema
Star schemaStar schema
Star schema
 
Tableau Desktop Material
Tableau Desktop MaterialTableau Desktop Material
Tableau Desktop Material
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
 
Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3
 
The Data Warehouse Lifecycle
The Data Warehouse LifecycleThe Data Warehouse Lifecycle
The Data Warehouse Lifecycle
 
Introduction to Dimesional Modelling
Introduction to Dimesional ModellingIntroduction to Dimesional Modelling
Introduction to Dimesional Modelling
 
Teradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional ModelsTeradata Aggregate Join Indices And Dimensional Models
Teradata Aggregate Join Indices And Dimensional Models
 
Rodney Matejek Portfolio
Rodney Matejek PortfolioRodney Matejek Portfolio
Rodney Matejek Portfolio
 
Quick start learn dax basics in 30 minutes
Quick start   learn dax basics in 30 minutesQuick start   learn dax basics in 30 minutes
Quick start learn dax basics in 30 minutes
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdf
 

More from Sayed Ahmed

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsSayed Ahmed
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commandsSayed Ahmed
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic frameworkSayed Ahmed
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSayed Ahmed
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction toSayed Ahmed
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overviewSayed Ahmed
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend frameworkSayed Ahmed
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3Sayed Ahmed
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2Sayed Ahmed
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_htmlSayed Ahmed
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcutsSayed Ahmed
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfonySayed Ahmed
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayedSayed Ahmed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_designSayed Ahmed
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrativeSayed Ahmed
 

More from Sayed Ahmed (20)

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and Ethics
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commands
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodev
 
Invest wisely
Invest wiselyInvest wisely
Invest wisely
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction to
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overview
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend framework
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_html
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcuts
 
Virtualization
VirtualizationVirtualization
Virtualization
 
User interfaces
User interfacesUser interfaces
User interfaces
 
Unreal
UnrealUnreal
Unreal
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfony
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_design
 
Symfony 2
Symfony 2Symfony 2
Symfony 2
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrative
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Data Warehouse Fact Table Design

  • 1. SOFTWARE/WEB/MOBILE/DATABASE ARCHITECT, ENGINEER, AND DEVELOPER TORONTO, CANADA HTTP://SAYED.JUSTETC.NET HTTP://WWW.JUSTETC.NET Sayed Ahmed Data Warehouse Fact Table Design Logical Design of a Data Warehouse
  • 2.  This is a video just for the sake of a video  I will not explain anything  Just will walk through on some presentation slides on Data Warehouse
  • 3. OUR SERVICES  Free Training and Educational Services  Training and Education in Bangla:  Bangla.SaLearningSchool.com  Training and Education in English:  www.SaLearningSchool.com  English.SaLearningSchool.com  http://sitestree.com  Ask a question and get answers:  Ask.JustEtc.net
  • 4. FACT TABLE DESIGN  Fact Table Design Topics  Define fact table column types  Understand the additivity of a measure  i.e. for measure column type  Handle many-to-many relationships in a Star schema
  • 5. FACT TABLE COLUMN TYPES  Fact Table Column Types  Foreign keys  Measures  Lineage columns (optional)  Business key columns  from the primary source table (optional)  Surrogate keys
  • 6. FACT TABLE COLUMNS - MEASURE  Measure Column Type  Measure columns help with measurements  useful for a specific business process  Measures columns are usually numeric  And can be aggregated  Measure columns store values that are of interest to businesses such as  sales amount, order quantity, and discount amount
  • 7. MEASURES  Fact tables - Measures  Collection of measurements on a specific aspects of business  Measure columns  sales amount, order quantity, and discount amount.
  • 8. FACT TABLE COLUMNS – FOREIGN KEY  Foreign Key – Column Type  These are the columns as coming from Dimension Tables  Are the primary keys of Dimension Tables
  • 9. FACT TABLE COLUMNS – SURROGATE KEYS  Surrogate Key  Usually will comes from the primary dimension table (primary for the current fact table)  Usually one or two columns in a fact table are surrogate keys 
  • 10. SURROGATE KEYS FOR FACT TABLES OrderId and LineItemId are the surrogate keys as coming from the primary Source Order details table OrderId and LineItemId columns will help For quick comparisons with source data Surrogate keys are not a must in fact tables; however, they help Must read: http://www.kimballgroup.com/2006/07/d esign-tip-81-fact-table-surrogate-key/
  • 11. LINEAGE COLUMNS IN FACT TABLES  Lineage columns  Just as with dimension tables, these are strictly for auditing purposes  References:  https://upsearch.com/implementing-a-data- warehouse-fact-tables/
  • 12. ADDITIVITY OF MEASURES  The primary purpose of Data warehouse is reporting, and forecasting  Many times reports are aggregations such as sum  Example: sales by quarter, by region, by product type  Many reports are usually aggregations  Hence, fact tables will have some columns to assist with that measures and aggregations for reporting  These are the measures columns as we discussed before  The measures that you add will help in how you want to do the measures and reporting
  • 13. TYPES OF ADDITIVITY OF MEASURES  Types of Additivity of Measures  additive measures  Semi-additive measures  non-additive measures 
  • 14. ADDITIVE, SEMI-ADDITIVE MEASURES  Additive  If a measure can be summed across all dimensions  Semi-additive  Sometimes, we can sum a measure across all dimensions except for time  such as account balance  We can’t sum the account balance across the time dimension  We would need to do something like take the average instead  or simply use the last value  Measures like this are called semi-additive measures
  • 15. NON-ADDITIVE MEASURES  Some measures can’t ever be summed  These are called non-additive measures  Such as discount percentages and prices  These are the non-additive measures
  • 16. ADDITIVITY OF MEASURES IN SSAS  SSAS has support for semi-additive and non- additive measures  The SSAS database model  Business Intelligence Semantic Model (BISM).  BISM includes way more additional metadata than RDBMS  SSAS has two types of storage  dimensional and  tabular
  • 17. SSAS AND ADDITIVITY OF MEASURES  Tabular storage works through tables like a data warehouse does  quicker to develop  The dimensional model  more properly represents a cube  The dimensional model includes  even more metadata than the tabular model
  • 18. SSAS AND ADDITIVITY OF MEASURES  In BISM dimensional processing  SSAS offers semi-additive aggregate functions out of the box  For example,  SSAS offers the LastNonEmpty aggregate function  which properly uses the SUM aggregate function across all dimensions but time  and defines the last known value as the aggregate over time
  • 19. SSAS AND ADDITIVITY OF MEASURES  In the BISM tabular model  you use the Data Analysis Expression (DAX) language  The DAX language includes functions that let you build semi-additive expressions quite quickly as well
  • 20. MANY TO MANY RELATIONSHIPS IN DATA WAREHOUSE  RDBMS Many to Many Relationship
  • 21. MANY TO MANY IN RDBMS AND DW  RDBMS Model as above image is ok, Because  Every internet sales will have multiple reasons  Every reasons will have multiple internet sales  However, data warehouse has issues with such modeling  because when using tools to build reporting the fact table is expected to be on the many side  In the above picture, fact table is on the one side  In SSAS reporting, many times, we use tools that build MDX queries that expect the schema to be perfectly in star or snow-flake schema
  • 22. HOW CAN WE RESOLVE ...  In SSAS with a BISM dimensional model  you can solve the problem by creating an intermediate dimension between both fact tables  Picture as below
  • 23. MANY TO MANY RELATIONSHIP
  • 24. DW MANY TO MANY  You create it from the primary key of theFactInternetSales table  DimFactInternetSales.  put it on the “one” side of the relationships with both fact tables  Now, both fact tables are always on the “many” side of any relationship  However, the relationship between theFactInternetSales and the new DimFactInternetSales dimension  is de facto one to one
  • 26. OUR SERVICES  Free Training and Educational Services  Training and Education in Bangla:  Bangla.SaLearningSchool.com  Training and Education in English:  www.SaLearningSchool.com  English.SaLearningSchool.com  http://sitestree.com  Ask a question and get answers:  Ask.JustEtc.net