SlideShare a Scribd company logo
1 of 32
DIMENSION / FACT TABLE &
TYPES DATA WAREHOUSE
 INTRODUCTION TO DWH
 DIMENSIONAL MODEL
 DIMENSION TABLE
 TYPES OF DIMENSION TABLES
 FACTS & TYPES
 FACT TABLE
 TYPES OF FACT TABLE
 KEYS UMAIR SAEED
INTRODUCTION TO DWH
• DATA Warehouse is Enterprise data warehouse, system used for reporting
and data analysis also a core component of business intelligence.
• Data Warehouses central repositories of integrated data form more disparate
sources.
• Essentially combine information from several sources into one
comprehensive database.
• Data Warehouse contains data from many operational sources.
• Storage is structured such that users from many divisions and departments
within organization can access and analyze the data according to their needs.
UMAIR SAEED
INTRODUCTION TO DWH
UMAIR SAEED
DIMENSIONAL MODEL
• A dimensional model is a database structure that is optimized for online
queries and Data Warehousing tools.
• Dimensional model is designed to read, summarize, analyze numeric
information like values, balances, counts, weights, etc. in a data warehouse.
• It is comprised of “Facts” and “Dimension” tables.
• A “Fact” is a numeric value that a business wishes to count or sum.
• A “Dimension” is essentially an entry point for getting at the facts.
• EXAMPLES: STAR Schema, Snow Flake Schema etc.
UMAIR SAEED
DIMENSION TABLE
• Describes the objects present in the Fact table.
• Dimension tables’ help to describe dimensions i.e. dimension values,
attributes and keys.
• Dimension Table refers to the collection or group of information related to
any measurable event.
• They form a core for dimensional modelling.
• Dimension tables are de-normalized tables.
• It is being joined with the fact tables through foreign key.
UMAIR SAEED
DIMENSION TABLE
WHY DO WE NEED TO USE?
• Its help to store dimensional information.
• Its is easy to understand than the normalized tables.
• More columns can be added to the table without affecting the existing
applications that are using those.
UMAIR SAEED
DIMENSION TABLES
DIMENSION TABLES
UMAIR SAEED
TYPES OF DIMENSION TABLE
• SCD (SLOWLY CHANGING DIMENSION)
• CONFORMED DIMENSION
• JUNK DIMENSION
• DEGENERATE DIMENSION
• ROLE PLAY DIMENSION
• STATIC DIMENSION
UMAIR SAEED
UMAIR SAEED
SCD (SLOWLY CHANGING DIMENSION)
• Attributes of a dimension that would undergo changes over time.
• Dimension attributes that change slowly over a period of time rather than
changing regularly is grouped as SCDs.
• Attributes like name, address can change but not too often.
• Consider an example where a person is changing from one city to another.
Now there are 3 ways to change the address.
• Type 1 is to over write the old value, Type 2 is to add a new row and Type 3
is to create a new column.
UMAIR SAEED
SCD (EXAMPLE)
• A man who travels to different countries so he needs to change his
address according to that country. This can be done in three ways:
• Type 1:
Overwrite the previous value. This method is easy to apply and helps to save space
hence reduce cost. But, history is lost in this scenario.
UMAIR SAEED
SCD (EXAMPLE)
• Type 2:
• Add a new row with the new value.
• In this method, the history is saved and can be used whenever necessary. But it takes
large space hence increases the cost.
UMAIR SAEED
SCD (EXAMPLE)
• Type 3:
• Add a new column. It is the best approach as history can be maintained easily.
UMAIR SAEED
CONFORMED DIMENSIONS
• A dimension that is used in multiple locations
• This dimension is shared among multiple subject areas or data marts.
• Same can be used in different projects without any modifications done
in the same.
• This is used to maintain consistency.
• Conformed dimensions are those which are exactly same or a proper
subset of any other dimension.
UMAIR SAEED
CONFORMED DIMENSION
UMAIR SAEED
JUNK DIMENSION
• A junk dimension is a group of attributes of low cardinality.
• It contains different or various attributes which are unrelated to any other
attribute.
• These can be used to implement RCD (rapidly changing dimension) such as
flags, weights etc.
• It is a single table with a combination of different and unrelated attributes to
avoid having a large number of foreign keys in the fact table.
• They are often created to manage the foreign keys created by rapidly changing
dimensions.
UMAIR SAEED
JUNK DIMENSION
UMAIR SAEED
DEGENERATE DIMENSION
• A degenerate dimension is when the dimension attribute is stored as part of
fact table, and not in a separate dimension table.
• These are essentially dimension keys for which there are no other attributes.
• It attributes which are stored in the fact table itself and not as a separate
dimension table, those attributes are called degenerate dimension.
• For e.g. ticket number, invoice number, transaction number etc.
UMAIR SAEED
DEGENERATE DIMENSION
UMAIR SAEED
ROLE PLAYING DIMENSION
• The having multiple relationships with the fact table are called role-play
dimension.
• In other words, it is when the same dimension key with all its related
attributes is joined to many foreign key presents in the fact table.
• It can fulfil multiple purposes within the same existing database.
• For example, a fact table may include foreign keys for both ship date and
delivery date. But the same date dimension attributes apply to each foreign
key, so you can join the same dimension table to both foreign keys.
UMAIR SAEED
ROLE PLAYING DIMENSION
UMAIR SAEED
FACT
• A fact table stores quantitative information for analysis and
is often de-normalized.
• fact table holds the measures, metrics and other quantifiable
information
• Facts are also known as measurements or metrics.
UMAIR SAEED
FACTS TYPES
• There are three types of Facts
1. ADDITIVE FACTS:
Additive Facts can be used with any aggregation function like SUM (), AVG (), etc.
Example: Quantity, Sales amount etc.
2. SEMI-ADDITIVE FACTS:
Semi-Additive Facts are those where only a few of aggregation function can be applied.
Example: consider Bank account details. You cannot apply the SUM (), on the bank
balance that does not give useful results but MIN () and MAX () function may return useful
information.
3. NON-ADDITIVE FACTS:
You cannot use numeric aggregation functions such as SUM (), AVG () etc,On Non-
Additive Facts
UMAIR SAEED
FACT TABLE
• A Fact table is nothing but the table that contains all the facts or the
business information, which can be subjected to analysis and reporting
activities.
• These tables hold fields that represent the direct facts.
• foreign fields that are used to connect the fact table with other dimension
tables in the Data Warehouse system.
• A Data Warehouse system can have one or more fact tables, depending on
the model type used to design the Data Warehouse.
UMAIR SAEED
CHARACHTERISTICS OF FACTS TABLE
UMAIR SAEED
CHARACHTERISTICS OF FACTS TABLE
• KEYS: It has a key or a primary key which is the accumulation of
all the primary keys of all dimension tables linked with it. That
key is known as a concatenated key that helps to uniquely
identify the row.
• FACT TABLE GRAIN: Grain of a table depicts the level of the detail or the
depth of the information that is contained in that table. More the level, more
the efficiency of the table.
• ADDITIVE MEASURE: In this types of measures are handled.
• SPARSE DATA: There are records that have attributes containing null
values or measures. They provide no information.
• SHRUNKEN ROLLUP DIMENSION: Shrunken Rollup dimensions are
the subdivisions of the base dimension.
UMAIR SAEED
TYPES OF FACT TABLES
UMAIR SAEED
TYPES OF FACT TABLES
• TRANSACTION FACT TABLE
This is a fundamental and basic view of business operations.
It is used to represent an occurrence of an event at any instantaneous point of time.
The facts measure are valid only for that particular instant and only for that event.
The grain which is associated with the transaction table specifies as “one row per line
in a transaction”.
Usually, it contains the data of the detailed level, which leads it to have a large number
of dimensions associated with it.
It captures the measurement at the most basic or atomic level of dimension.
This helps the table to give robust dimensional grouping, roll up & drill-down
reporting capabilities to the users. UMAIR SAEED
TRANSACTION FACT TABLE
UMAIR SAEED
SNAPSHOT FACT TABLE
• The snapshot gives the state of things at a particular instance of time or
“picture of the moment”.
• It normally includes more non- additive and semi-additive facts.
• the performance of an activity at the end of each day or a week or a month
or any other time interval is represented
• unlike the transaction fact table where a new row is added for the
occurrence of every event.
• dependent on the transaction fact table to get the detailed data present in
the transaction fact table.
UMAIR SAEED
SNAPSHOT FACT TABLE
UMAIR SAEED
ACCUMULATING FACT TABLE
• These are used to represent the activity of any
process that has a well defined and clear
starting and end.
• Accumulating snapshots mostly have multiple
data stamps that represent the predictable
phases.
• Sometimes there is an extra column containing
the date that shows when the row was last
updated.
UMAIR SAEED

More Related Content

What's hot

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
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
Ehtisham Ali
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing concepts
pcherukumalla
 

What's hot (20)

Difference between fact tables and dimension tables
Difference between fact tables and dimension tablesDifference between fact tables and dimension tables
Difference between fact tables and dimension tables
 
Data Warehouse Fundamentals
Data Warehouse FundamentalsData Warehouse Fundamentals
Data Warehouse Fundamentals
 
OLTP vs OLAP
OLTP vs OLAPOLTP vs OLAP
OLTP vs OLAP
 
Introduction Data warehouse
Introduction Data warehouseIntroduction Data warehouse
Introduction Data warehouse
 
Dimensional Modelling
Dimensional ModellingDimensional Modelling
Dimensional Modelling
 
Data Warehouse
Data Warehouse Data Warehouse
Data Warehouse
 
Data warehouse architecture
Data warehouse architecture Data warehouse architecture
Data warehouse architecture
 
Star ,Snow and Fact-Constullation Schemas??
Star ,Snow and  Fact-Constullation Schemas??Star ,Snow and  Fact-Constullation Schemas??
Star ,Snow and Fact-Constullation Schemas??
 
SQL Server Index and Partition Strategy
SQL Server Index and Partition StrategySQL Server Index and Partition Strategy
SQL Server Index and Partition Strategy
 
Data Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional ModelingData Warehouse Back to Basics: Dimensional Modeling
Data Warehouse Back to Basics: Dimensional Modeling
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
Retail Data Warehouse
Retail Data WarehouseRetail Data Warehouse
Retail Data Warehouse
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing concepts
 
Relational databases
Relational databasesRelational databases
Relational databases
 
Data models
Data modelsData models
Data models
 
Database Archiving - Managing Data for Long Retention Periods
Database Archiving - Managing Data for Long Retention PeriodsDatabase Archiving - Managing Data for Long Retention Periods
Database Archiving - Managing Data for Long Retention Periods
 
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
 
Data Warehouse (ETL) testing process
Data Warehouse (ETL) testing processData Warehouse (ETL) testing process
Data Warehouse (ETL) testing process
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical Processing
 

Similar to Dimensional model | | Fact Tables | | Types

Dataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra SolutionsDataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra Solutions
Quontra Solutions
 
Dataware house introduction by InformaticaTrainingClasses
Dataware house introduction by InformaticaTrainingClassesDataware house introduction by InformaticaTrainingClasses
Dataware house introduction by InformaticaTrainingClasses
InformaticaTrainingClasses
 
Asper database presentation - Data Modeling Topics
Asper database presentation - Data Modeling TopicsAsper database presentation - Data Modeling Topics
Asper database presentation - Data Modeling Topics
Terry Bunio
 

Similar to Dimensional model | | Fact Tables | | Types (20)

Dataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra SolutionsDataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra Solutions
 
Dataware house introduction by InformaticaTrainingClasses
Dataware house introduction by InformaticaTrainingClassesDataware house introduction by InformaticaTrainingClasses
Dataware house introduction by InformaticaTrainingClasses
 
Data warehouse 18 logical dimensional model for data warehouse
Data warehouse 18 logical dimensional model for data warehouseData warehouse 18 logical dimensional model for data warehouse
Data warehouse 18 logical dimensional model for data warehouse
 
Data warehouse 17 dimensional data model
Data warehouse 17 dimensional data modelData warehouse 17 dimensional data model
Data warehouse 17 dimensional data model
 
Dimensional modeling primer
Dimensional modeling primerDimensional modeling primer
Dimensional modeling primer
 
Data Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptxData Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptx
 
Data modeling facts
Data modeling factsData modeling facts
Data modeling facts
 
An introduction to data warehousing
An introduction to data warehousingAn introduction to data warehousing
An introduction to data warehousing
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
data mining and data warehousing
data mining and data warehousingdata mining and data warehousing
data mining and data warehousing
 
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
Dimensional modeling primer - SQL Saturday Madison - April 11th, 2015
 
Introduction to Data Warehousing
Introduction to Data WarehousingIntroduction to Data Warehousing
Introduction to Data Warehousing
 
Asper database presentation - Data Modeling Topics
Asper database presentation - Data Modeling TopicsAsper database presentation - Data Modeling Topics
Asper database presentation - Data Modeling Topics
 
Intro to Data warehousing lecture 13
Intro to Data warehousing   lecture 13Intro to Data warehousing   lecture 13
Intro to Data warehousing lecture 13
 
Statistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query TuningStatistis, Row Counts, Execution Plans and Query Tuning
Statistis, Row Counts, Execution Plans and Query Tuning
 
First Steps to Define Grain
First Steps to Define GrainFirst Steps to Define Grain
First Steps to Define Grain
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Data Visualization & Analytics.pptx
Data Visualization & Analytics.pptxData Visualization & Analytics.pptx
Data Visualization & Analytics.pptx
 
Ms excel
Ms excelMs excel
Ms excel
 
Data presentation by graphs and diagrams
Data presentation by graphs and diagramsData presentation by graphs and diagrams
Data presentation by graphs and diagrams
 

Recently uploaded

Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
jk0tkvfv
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh +966572737505 get cytotec
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
yulianti213969
 

Recently uploaded (20)

Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchers
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
jll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdfjll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdf
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
 
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting Techniques
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
 
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSDBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 

Dimensional model | | Fact Tables | | Types

  • 1. DIMENSION / FACT TABLE & TYPES DATA WAREHOUSE  INTRODUCTION TO DWH  DIMENSIONAL MODEL  DIMENSION TABLE  TYPES OF DIMENSION TABLES  FACTS & TYPES  FACT TABLE  TYPES OF FACT TABLE  KEYS UMAIR SAEED
  • 2. INTRODUCTION TO DWH • DATA Warehouse is Enterprise data warehouse, system used for reporting and data analysis also a core component of business intelligence. • Data Warehouses central repositories of integrated data form more disparate sources. • Essentially combine information from several sources into one comprehensive database. • Data Warehouse contains data from many operational sources. • Storage is structured such that users from many divisions and departments within organization can access and analyze the data according to their needs. UMAIR SAEED
  • 4. DIMENSIONAL MODEL • A dimensional model is a database structure that is optimized for online queries and Data Warehousing tools. • Dimensional model is designed to read, summarize, analyze numeric information like values, balances, counts, weights, etc. in a data warehouse. • It is comprised of “Facts” and “Dimension” tables. • A “Fact” is a numeric value that a business wishes to count or sum. • A “Dimension” is essentially an entry point for getting at the facts. • EXAMPLES: STAR Schema, Snow Flake Schema etc. UMAIR SAEED
  • 5. DIMENSION TABLE • Describes the objects present in the Fact table. • Dimension tables’ help to describe dimensions i.e. dimension values, attributes and keys. • Dimension Table refers to the collection or group of information related to any measurable event. • They form a core for dimensional modelling. • Dimension tables are de-normalized tables. • It is being joined with the fact tables through foreign key. UMAIR SAEED
  • 6. DIMENSION TABLE WHY DO WE NEED TO USE? • Its help to store dimensional information. • Its is easy to understand than the normalized tables. • More columns can be added to the table without affecting the existing applications that are using those. UMAIR SAEED
  • 8. TYPES OF DIMENSION TABLE • SCD (SLOWLY CHANGING DIMENSION) • CONFORMED DIMENSION • JUNK DIMENSION • DEGENERATE DIMENSION • ROLE PLAY DIMENSION • STATIC DIMENSION UMAIR SAEED
  • 10. SCD (SLOWLY CHANGING DIMENSION) • Attributes of a dimension that would undergo changes over time. • Dimension attributes that change slowly over a period of time rather than changing regularly is grouped as SCDs. • Attributes like name, address can change but not too often. • Consider an example where a person is changing from one city to another. Now there are 3 ways to change the address. • Type 1 is to over write the old value, Type 2 is to add a new row and Type 3 is to create a new column. UMAIR SAEED
  • 11. SCD (EXAMPLE) • A man who travels to different countries so he needs to change his address according to that country. This can be done in three ways: • Type 1: Overwrite the previous value. This method is easy to apply and helps to save space hence reduce cost. But, history is lost in this scenario. UMAIR SAEED
  • 12. SCD (EXAMPLE) • Type 2: • Add a new row with the new value. • In this method, the history is saved and can be used whenever necessary. But it takes large space hence increases the cost. UMAIR SAEED
  • 13. SCD (EXAMPLE) • Type 3: • Add a new column. It is the best approach as history can be maintained easily. UMAIR SAEED
  • 14. CONFORMED DIMENSIONS • A dimension that is used in multiple locations • This dimension is shared among multiple subject areas or data marts. • Same can be used in different projects without any modifications done in the same. • This is used to maintain consistency. • Conformed dimensions are those which are exactly same or a proper subset of any other dimension. UMAIR SAEED
  • 16. JUNK DIMENSION • A junk dimension is a group of attributes of low cardinality. • It contains different or various attributes which are unrelated to any other attribute. • These can be used to implement RCD (rapidly changing dimension) such as flags, weights etc. • It is a single table with a combination of different and unrelated attributes to avoid having a large number of foreign keys in the fact table. • They are often created to manage the foreign keys created by rapidly changing dimensions. UMAIR SAEED
  • 18. DEGENERATE DIMENSION • A degenerate dimension is when the dimension attribute is stored as part of fact table, and not in a separate dimension table. • These are essentially dimension keys for which there are no other attributes. • It attributes which are stored in the fact table itself and not as a separate dimension table, those attributes are called degenerate dimension. • For e.g. ticket number, invoice number, transaction number etc. UMAIR SAEED
  • 20. ROLE PLAYING DIMENSION • The having multiple relationships with the fact table are called role-play dimension. • In other words, it is when the same dimension key with all its related attributes is joined to many foreign key presents in the fact table. • It can fulfil multiple purposes within the same existing database. • For example, a fact table may include foreign keys for both ship date and delivery date. But the same date dimension attributes apply to each foreign key, so you can join the same dimension table to both foreign keys. UMAIR SAEED
  • 22. FACT • A fact table stores quantitative information for analysis and is often de-normalized. • fact table holds the measures, metrics and other quantifiable information • Facts are also known as measurements or metrics. UMAIR SAEED
  • 23. FACTS TYPES • There are three types of Facts 1. ADDITIVE FACTS: Additive Facts can be used with any aggregation function like SUM (), AVG (), etc. Example: Quantity, Sales amount etc. 2. SEMI-ADDITIVE FACTS: Semi-Additive Facts are those where only a few of aggregation function can be applied. Example: consider Bank account details. You cannot apply the SUM (), on the bank balance that does not give useful results but MIN () and MAX () function may return useful information. 3. NON-ADDITIVE FACTS: You cannot use numeric aggregation functions such as SUM (), AVG () etc,On Non- Additive Facts UMAIR SAEED
  • 24. FACT TABLE • A Fact table is nothing but the table that contains all the facts or the business information, which can be subjected to analysis and reporting activities. • These tables hold fields that represent the direct facts. • foreign fields that are used to connect the fact table with other dimension tables in the Data Warehouse system. • A Data Warehouse system can have one or more fact tables, depending on the model type used to design the Data Warehouse. UMAIR SAEED
  • 25. CHARACHTERISTICS OF FACTS TABLE UMAIR SAEED
  • 26. CHARACHTERISTICS OF FACTS TABLE • KEYS: It has a key or a primary key which is the accumulation of all the primary keys of all dimension tables linked with it. That key is known as a concatenated key that helps to uniquely identify the row. • FACT TABLE GRAIN: Grain of a table depicts the level of the detail or the depth of the information that is contained in that table. More the level, more the efficiency of the table. • ADDITIVE MEASURE: In this types of measures are handled. • SPARSE DATA: There are records that have attributes containing null values or measures. They provide no information. • SHRUNKEN ROLLUP DIMENSION: Shrunken Rollup dimensions are the subdivisions of the base dimension. UMAIR SAEED
  • 27. TYPES OF FACT TABLES UMAIR SAEED
  • 28. TYPES OF FACT TABLES • TRANSACTION FACT TABLE This is a fundamental and basic view of business operations. It is used to represent an occurrence of an event at any instantaneous point of time. The facts measure are valid only for that particular instant and only for that event. The grain which is associated with the transaction table specifies as “one row per line in a transaction”. Usually, it contains the data of the detailed level, which leads it to have a large number of dimensions associated with it. It captures the measurement at the most basic or atomic level of dimension. This helps the table to give robust dimensional grouping, roll up & drill-down reporting capabilities to the users. UMAIR SAEED
  • 30. SNAPSHOT FACT TABLE • The snapshot gives the state of things at a particular instance of time or “picture of the moment”. • It normally includes more non- additive and semi-additive facts. • the performance of an activity at the end of each day or a week or a month or any other time interval is represented • unlike the transaction fact table where a new row is added for the occurrence of every event. • dependent on the transaction fact table to get the detailed data present in the transaction fact table. UMAIR SAEED
  • 32. ACCUMULATING FACT TABLE • These are used to represent the activity of any process that has a well defined and clear starting and end. • Accumulating snapshots mostly have multiple data stamps that represent the predictable phases. • Sometimes there is an extra column containing the date that shows when the row was last updated. UMAIR SAEED