SlideShare a Scribd company logo
SCHEMAS FOR
MULTIDIMENSIONAL
DATABASES
Sarvajanik College of Engineering &Technology
Computer (Shift-1) 7th year
Presented by:
Yazad H. Dumasia
What is Schema?
 Database uses relational model while data warehouse
requires Schema.
 Schema is a logical description of the entire
database.
 It includes the name and description of records.
 Much like a database, a data warehouse also requires
to maintain a schema.
Types of Schemas
 Star Schema
 Snowflake Schema
 Galaxy Schema
Fact Table
 Contains primary information of the warehouse.
 Contain the contents of the data warehouse and store
different types of measures.
 Located at center in Star or Snowflake Schema
surrounded by dimensional tables.
 Two columns: Measurements(numeric values)and
Foreign keys to dimension tables.
Dimension Table
 Contain information about a particular dimension.
 Textual information of the business
 Stores attributes or dimensions that describes
the objects in a fact table.
 Dimension table has a surrogate key column that
uniquely identifies each dimension record.
 It is de-normalized because built to analyze data as easily as
possible.
Star Schema
 Star schema is a relational model with
one-to-many relationship between the fact table and
the dimension tables.
 De-normalized model.
 Easy for users to understand.
 Easy querying and data analysis.
 Ability to drill down or roll up.
Star Schema
 Each dimension in a star schema is represented
with only one-dimension table.
 This dimension table contains the set of attributes.
 There is a fact table at the center. It contains the
keys to each of four dimensions.
 The fact table also contains the attributes, namely
dollars sold and units sold.
Star Schema
time_key
day
day_of_the_week
month
quarter
year
time
location_key
street
city
state_or_province
country
location
Sales Fact Table
time_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_sales
Measures
item_key
item_name
brand
type
supplier_type
item
branch_key
branch_name
branch_type
branch
Star Schema
 Here Sales Fact table got concatenated keys
 Concatenation of all the primary keys of the
dimension tables i.e. Time Key of Time Dimension
table, Item Key of Item Dimension table, Location key
from Location dimension table, Branch key from
Branch dimension table.
Star Schema in Real-world Database
SELECT
P.Brand,
S.Country AS Countries,
SUM(F.Units_Sold)
FROM Fact_Sales F
INNER JOIN Dim_Date D ON (F.Date_Id = D.Id)
INNER JOIN Dim_Store S ON (F.Store_Id = S.Id)
INNER JOIN Dim_Product P ON (F.Product_Id = P.Id)
WHERE D.Year = 1997 AND P.Product_Category =
'tv' GROUP BY P.Brand, S.Country
Benefits Star Schema
• Star schemas are denormalized, meaning the normal rules of normalization applied
to transactional relational databases are relaxed during star schema design and
implementation. The benefits of star schema denormalization are:
• Simpler queries - star schema join logic is generally simpler than the join logic
required to retrieve data from a highly normalized transactional schema.
• Simplified business reporting logic - when compared to
highly normalized schemas, the star schema simplifies common business reporting
logic, such as period-over-period and as-of reporting.
• Query performance gains - star schemas can provide performance enhancements
for read-only reporting applications when compared to
highly normalized schemas.
• Fast aggregations - the simpler queries against a star schema can result in
improved performance for aggregation operations.
• Feeding cubes - star schemas are used by all OLAP systems to build
proprietary OLAP cubes efficiently; in fact, most major OLAP systems provide
a ROLAP mode of operation which can use a star schema directly as a source
without building a proprietary cube structure.
Demerits
• The main disadvantage of the star schema is that data integrity is not
enforced as well as it is in a highly normalized database.One-off inserts and
updates can result in data anomalies which normalized schemas are
designed to avoid.Generally speaking, star schemas are loaded in a highly
controlled fashion via batch processing or near-real time "trickle feeds", to
compensate for the lack of protection afforded by normalization.
• Star schema is also not as flexible in terms of analytical needs as a
normalized data model.
• Normalized models allow any kind of analytical queries to be executed as
long as they follow the business logic defined in the model. Star schemas
tend to be more purpose-built for a particular view of the data, thus not
really allowing more complex analytics.
• Star schemas don't support many-to-many relationships between business
entities - at least not very naturally.Typically these relationships are
simplified in star schema to conform to the simple dimensional model.
Snowflake Schema
 Some dimension tables in the Snowflake schema
are normalized.
 The normalization splits up the data into additional
tables.
 Unlike Star schema, the dimensions table in a
snowflake schema are normalized.
Snowflake Schema
time_key
day
day_of_the_week
month
quarter
year
Time
location_key
street
city_key
location
Sales Fact Table
time_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_sales
Measures
item_key
item_name
brand
type
supplier_key
Item
branch_key
branch_name
branch_type
Branch
supplier_key
supplier_type
Supplier
city_key
city
state_or_province
country
city
Snowflake Schema
 For example, the item dimension table in star
schema is normalized and split into two dimension
tables, namely item and supplier table.
 Advantage of Snowflake schema is that it is easier
to update and maintain normalized structures.
 Disadvantage of Snowflake schema is that it
degrades the query performance because of additional
joins..
Snowflake Schema in Real-world Database
SELECT
B.Brand,
G.Country,
SUM(F.Units_Sold)
FROM Fact_Sales F
INNER JOIN Dim_Date D ON F.Date_Id = D.Id
INNER JOIN Dim_Store S ON F.Store_Id = S.Id
INNER JOIN Dim_Geography G ON S.Geography_Id =
G.Id
INNER JOIN Dim_Product P ON F.Product_Id = P.Id
INNER JOIN Dim_Brand B ON P.Brand_Id = B.Id
INNER JOIN Dim_Product_Category C ON
P.Product_Category_Id = C.Id
WHERE D.Year = 1997 AND C.Product_Category =
'tv' GROUP BY B.Brand, G.Country
Benefits Snowflake Schema
• The snowflake schema is in the same family as the star schema logical
model.
• In fact, the star schema is considered a special case of the snowflake
schema. The snowflake schema provides some advantages over the star
schema in certain situations, including:
• Some OLAP multidimensional database modeling tools are optimized for
snowflake schemas.
• Normalizing attributes results in storage savings, the tradeoff being
additional complexity in source query joins.
Demerits
• The primary disadvantage of the snowflake schema is that the additional
levels of attribute normalization adds complexity to source query joins, when
compared to the star schema.
• Snowflake schemas, in contrast to flat single table dimensions, have been
heavily criticized. Their goal is assumed to be an efficient and compact
storage of normalized data but this is at the significant cost of poor
performance when browsing the joins required in this dimension.[3] This
disadvantage may have reduced in the years since it was first recognized,
owing to better query performance within the browsing tools.
• When compared to a highly normalized transactional schema, the snowflake
schema's denormalization removes the data integrity assurances provided by
normalized schemas. Data loads into the snowflake schema must be highly
controlled and managed to avoid update and insert anomalies.
Star Schema Snow Flake Schema
 The star schema is the simplest data warehouse
scheme.
 In star schema, each of the dimensions is
represented in a single table. It should not have
any hierarchies between dims.
 It contains a fact table surrounded by dimension
tables. If the dimensions are de-normalized, we
say it is a star schema design.
 In star schema only one join establishes the
relationship between the fact table and any one
of the dimension tables.
 A star schema optimizes the performance by
keeping queries simple and providing fast
response time. All the information about the
each level is stored in one row.
 It is called a star schema because the diagram
resembles a star.
 Snowflake schema is a more complex data
warehouse model than a star schema.
 In snow flake schema, at least one hierarchy
should exist between dimension tables.
 It contains a fact table surrounded by dimension
tables. If a dimension is normalized, we say it is a
snow flaked design.
 In snow flake schema since there is relationship
between the dimensions tables it has to do many
joins to fetch the data.
 Snowflake schemas normalize dimensions to
eliminated redundancy. The result is more
complex queries and reduced query
performance.
 It is called a snowflake schema because the
diagram resembles a snowflake.
Difference between Star Schema and Snow Flake Schema
Fact Constellation Schema
 A fact constellation has multiple fact tables.
 It is also known as galaxy schema.
 The following diagram shows two fact tables,
namely sales and shipping.
Fact Constellation Schema
time_key
day
day_of_the_week
month
quarter
year
Time
location_key
street
city
province_or_state
country
location
Sales Fact Table
time_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_sales
Measures
item_key
item_name
brand
type
supplier_type
item
branch_key
branch_name
branch_type
branch
Shipping Fact Table
time_key
item_key
shipper_key
from_location
to_location
dollars_cost
units_shipped
shipper_key
shipper_name
location_key
shipper_type
shipper
Fact Constellation Schema
 The sales fact table is same as that in the star
schema.
 Shipping fact table contains three dimensions.
 It is also possible to share dimension tables between
fact tables.
 For example item and location dimension tables
are shared between the sales and shipping fact table.
 It is a collection of schema in which multiple fact
tables share dimension tables. Sophisticated application
requires such schema.
Schemas for multidimensional databases

More Related Content

What's hot

OLAP
OLAPOLAP
OLAP
Ashir Ali
 
Data Warehouse Basic Guide
Data Warehouse Basic GuideData Warehouse Basic Guide
Data Warehouse Basic Guide
thomasmary607
 
3 tier data warehouse
3 tier data warehouse3 tier data warehouse
3 tier data warehouse
J M
 
Data warehouse
Data warehouseData warehouse
Data warehouse
Medma Infomatix (P) Ltd.
 
OLTP vs OLAP
OLTP vs OLAPOLTP vs OLAP
OLTP vs OLAP
BI_Solutions
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
Er. Nawaraj Bhandari
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical Processing
Walid Elbadawy
 
Star schema
Star schemaStar schema
Introduction to data warehousing
Introduction to data warehousing   Introduction to data warehousing
Introduction to data warehousing Girish Dhareshwar
 
Data warehouse
Data warehouseData warehouse
Data warehouse
krishna kumar singh
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
Saikiran Panjala
 
Data Warehousing and Data Mining
Data Warehousing and Data MiningData Warehousing and Data Mining
Data Warehousing and Data Mining
idnats
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing conceptspcherukumalla
 
Data warehousing
Data warehousingData warehousing
Data warehousing
Shruti Dalela
 
OLAP v/s OLTP
OLAP v/s OLTPOLAP v/s OLTP
OLAP v/s OLTP
ahsan irfan
 
Data warehousing and online analytical processing
Data warehousing and online analytical processingData warehousing and online analytical processing
Data warehousing and online analytical processing
VijayasankariS
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
Dr. C.V. Suresh Babu
 
DATA Warehousing & Data Mining
DATA Warehousing & Data MiningDATA Warehousing & Data Mining
DATA Warehousing & Data Mining
cpjcollege
 
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
Dunn Solutions Group
 

What's hot (20)

Ppt
PptPpt
Ppt
 
OLAP
OLAPOLAP
OLAP
 
Data Warehouse Basic Guide
Data Warehouse Basic GuideData Warehouse Basic Guide
Data Warehouse Basic Guide
 
3 tier data warehouse
3 tier data warehouse3 tier data warehouse
3 tier data warehouse
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
OLTP vs OLAP
OLTP vs OLAPOLTP vs OLAP
OLTP vs OLAP
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
OLAP OnLine Analytical Processing
OLAP OnLine Analytical ProcessingOLAP OnLine Analytical Processing
OLAP OnLine Analytical Processing
 
Star schema
Star schemaStar schema
Star schema
 
Introduction to data warehousing
Introduction to data warehousing   Introduction to data warehousing
Introduction to data warehousing
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
 
Data Warehousing and Data Mining
Data Warehousing and Data MiningData Warehousing and Data Mining
Data Warehousing and Data Mining
 
Date warehousing concepts
Date warehousing conceptsDate warehousing concepts
Date warehousing concepts
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
OLAP v/s OLTP
OLAP v/s OLTPOLAP v/s OLTP
OLAP v/s OLTP
 
Data warehousing and online analytical processing
Data warehousing and online analytical processingData warehousing and online analytical processing
Data warehousing and online analytical processing
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
 
DATA Warehousing & Data Mining
DATA Warehousing & Data MiningDATA Warehousing & Data Mining
DATA Warehousing & Data Mining
 
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
 

Similar to Schemas for multidimensional databases

MULTIMEDIA MODELING
MULTIMEDIA MODELINGMULTIMEDIA MODELING
MULTIMEDIA MODELING
Jasbeer Chauhan
 
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
 
Multidimensional schema of data warehouse
Multidimensional schema of data warehouseMultidimensional schema of data warehouse
Multidimensional schema of data warehouse
kunjan shah
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
Er. Nawaraj Bhandari
 
Dw concepts
Dw conceptsDw concepts
Dw concepts
Krishna Prasad
 
Data ware house design
Data ware house designData ware house design
Data ware house design
Sayed Ahmed
 
Data ware house design
Data ware house designData ware house design
Data ware house design
Sayed Ahmed
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
Sunita Sahu
 
Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3Malik Alig
 
Data Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptxData Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptx
Dr. Jasmine Beulah Gnanadurai
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
Iftikharbaig7
 
Multidimensional schema
Multidimensional schemaMultidimensional schema
Multidimensional schema
Chaand Chopra
 
Dimensional Modeling Concepts_Nishant.ppt
Dimensional Modeling Concepts_Nishant.pptDimensional Modeling Concepts_Nishant.ppt
Dimensional Modeling Concepts_Nishant.ppt
nishant523869
 
dataminingpres-150821063129-lva1-app6891 (3).pdf
dataminingpres-150821063129-lva1-app6891 (3).pdfdataminingpres-150821063129-lva1-app6891 (3).pdf
dataminingpres-150821063129-lva1-app6891 (3).pdf
AnilGupta681764
 
Data Warehouse Designing: Dimensional Modelling and E-R Modelling
Data Warehouse Designing: Dimensional Modelling and E-R ModellingData Warehouse Designing: Dimensional Modelling and E-R Modelling
Data Warehouse Designing: Dimensional Modelling and E-R Modelling
International Journal of Engineering Inventions www.ijeijournal.com
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
Prithwis Mukerjee
 
2018 data warehouse features in spark
2018   data warehouse features in spark2018   data warehouse features in spark
2018 data warehouse features in spark
Chester Chen
 
Export Data Model | SQL Database Modeler
Export Data Model | SQL Database ModelerExport Data Model | SQL Database Modeler
Export Data Model | SQL Database Modeler
SQL DBM
 
Dbms schemas for decision support
Dbms schemas for decision supportDbms schemas for decision support
Dbms schemas for decision support
rameswara reddy venkat
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data modeljagdish_93
 

Similar to Schemas for multidimensional databases (20)

MULTIMEDIA MODELING
MULTIMEDIA MODELINGMULTIMEDIA MODELING
MULTIMEDIA MODELING
 
Star ,Snow and Fact-Constullation Schemas??
Star ,Snow and  Fact-Constullation Schemas??Star ,Snow and  Fact-Constullation Schemas??
Star ,Snow and Fact-Constullation Schemas??
 
Multidimensional schema of data warehouse
Multidimensional schema of data warehouseMultidimensional schema of data warehouse
Multidimensional schema of data warehouse
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Dw concepts
Dw conceptsDw concepts
Dw concepts
 
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
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Dimensional modelling-mod-3
Dimensional modelling-mod-3Dimensional modelling-mod-3
Dimensional modelling-mod-3
 
Data Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptxData Warehouse_Architecture.pptx
Data Warehouse_Architecture.pptx
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
 
Multidimensional schema
Multidimensional schemaMultidimensional schema
Multidimensional schema
 
Dimensional Modeling Concepts_Nishant.ppt
Dimensional Modeling Concepts_Nishant.pptDimensional Modeling Concepts_Nishant.ppt
Dimensional Modeling Concepts_Nishant.ppt
 
dataminingpres-150821063129-lva1-app6891 (3).pdf
dataminingpres-150821063129-lva1-app6891 (3).pdfdataminingpres-150821063129-lva1-app6891 (3).pdf
dataminingpres-150821063129-lva1-app6891 (3).pdf
 
Data Warehouse Designing: Dimensional Modelling and E-R Modelling
Data Warehouse Designing: Dimensional Modelling and E-R ModellingData Warehouse Designing: Dimensional Modelling and E-R Modelling
Data Warehouse Designing: Dimensional Modelling and E-R Modelling
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
 
2018 data warehouse features in spark
2018   data warehouse features in spark2018   data warehouse features in spark
2018 data warehouse features in spark
 
Export Data Model | SQL Database Modeler
Export Data Model | SQL Database ModelerExport Data Model | SQL Database Modeler
Export Data Model | SQL Database Modeler
 
Dbms schemas for decision support
Dbms schemas for decision supportDbms schemas for decision support
Dbms schemas for decision support
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data model
 

More from yazad dumasia

Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib. Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib.
yazad dumasia
 
Classification decision tree
Classification  decision treeClassification  decision tree
Classification decision tree
yazad dumasia
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
yazad dumasia
 
Basic economic problem: Inflation
Basic economic problem: InflationBasic economic problem: Inflation
Basic economic problem: Inflation
yazad dumasia
 
Groundwater contamination
Groundwater contaminationGroundwater contamination
Groundwater contamination
yazad dumasia
 
Merge sort analysis and its real time applications
Merge sort analysis and its real time applicationsMerge sort analysis and its real time applications
Merge sort analysis and its real time applications
yazad dumasia
 
Cyber crime
Cyber crimeCyber crime
Cyber crime
yazad dumasia
 
Managing input and output operation in c
Managing input and output operation in cManaging input and output operation in c
Managing input and output operation in c
yazad dumasia
 

More from yazad dumasia (8)

Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib. Introduction to Pylab and Matploitlib.
Introduction to Pylab and Matploitlib.
 
Classification decision tree
Classification  decision treeClassification  decision tree
Classification decision tree
 
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
 
Basic economic problem: Inflation
Basic economic problem: InflationBasic economic problem: Inflation
Basic economic problem: Inflation
 
Groundwater contamination
Groundwater contaminationGroundwater contamination
Groundwater contamination
 
Merge sort analysis and its real time applications
Merge sort analysis and its real time applicationsMerge sort analysis and its real time applications
Merge sort analysis and its real time applications
 
Cyber crime
Cyber crimeCyber crime
Cyber crime
 
Managing input and output operation in c
Managing input and output operation in cManaging input and output operation in c
Managing input and output operation in c
 

Recently uploaded

一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 

Recently uploaded (20)

一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 

Schemas for multidimensional databases

  • 1. SCHEMAS FOR MULTIDIMENSIONAL DATABASES Sarvajanik College of Engineering &Technology Computer (Shift-1) 7th year
  • 3. What is Schema?  Database uses relational model while data warehouse requires Schema.  Schema is a logical description of the entire database.  It includes the name and description of records.  Much like a database, a data warehouse also requires to maintain a schema.
  • 4. Types of Schemas  Star Schema  Snowflake Schema  Galaxy Schema
  • 5. Fact Table  Contains primary information of the warehouse.  Contain the contents of the data warehouse and store different types of measures.  Located at center in Star or Snowflake Schema surrounded by dimensional tables.  Two columns: Measurements(numeric values)and Foreign keys to dimension tables.
  • 6. Dimension Table  Contain information about a particular dimension.  Textual information of the business  Stores attributes or dimensions that describes the objects in a fact table.  Dimension table has a surrogate key column that uniquely identifies each dimension record.  It is de-normalized because built to analyze data as easily as possible.
  • 7. Star Schema  Star schema is a relational model with one-to-many relationship between the fact table and the dimension tables.  De-normalized model.  Easy for users to understand.  Easy querying and data analysis.  Ability to drill down or roll up.
  • 8. Star Schema  Each dimension in a star schema is represented with only one-dimension table.  This dimension table contains the set of attributes.  There is a fact table at the center. It contains the keys to each of four dimensions.  The fact table also contains the attributes, namely dollars sold and units sold.
  • 9. Star Schema time_key day day_of_the_week month quarter year time location_key street city state_or_province country location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch
  • 10. Star Schema  Here Sales Fact table got concatenated keys  Concatenation of all the primary keys of the dimension tables i.e. Time Key of Time Dimension table, Item Key of Item Dimension table, Location key from Location dimension table, Branch key from Branch dimension table.
  • 11. Star Schema in Real-world Database SELECT P.Brand, S.Country AS Countries, SUM(F.Units_Sold) FROM Fact_Sales F INNER JOIN Dim_Date D ON (F.Date_Id = D.Id) INNER JOIN Dim_Store S ON (F.Store_Id = S.Id) INNER JOIN Dim_Product P ON (F.Product_Id = P.Id) WHERE D.Year = 1997 AND P.Product_Category = 'tv' GROUP BY P.Brand, S.Country
  • 12. Benefits Star Schema • Star schemas are denormalized, meaning the normal rules of normalization applied to transactional relational databases are relaxed during star schema design and implementation. The benefits of star schema denormalization are: • Simpler queries - star schema join logic is generally simpler than the join logic required to retrieve data from a highly normalized transactional schema. • Simplified business reporting logic - when compared to highly normalized schemas, the star schema simplifies common business reporting logic, such as period-over-period and as-of reporting. • Query performance gains - star schemas can provide performance enhancements for read-only reporting applications when compared to highly normalized schemas. • Fast aggregations - the simpler queries against a star schema can result in improved performance for aggregation operations. • Feeding cubes - star schemas are used by all OLAP systems to build proprietary OLAP cubes efficiently; in fact, most major OLAP systems provide a ROLAP mode of operation which can use a star schema directly as a source without building a proprietary cube structure.
  • 13. Demerits • The main disadvantage of the star schema is that data integrity is not enforced as well as it is in a highly normalized database.One-off inserts and updates can result in data anomalies which normalized schemas are designed to avoid.Generally speaking, star schemas are loaded in a highly controlled fashion via batch processing or near-real time "trickle feeds", to compensate for the lack of protection afforded by normalization. • Star schema is also not as flexible in terms of analytical needs as a normalized data model. • Normalized models allow any kind of analytical queries to be executed as long as they follow the business logic defined in the model. Star schemas tend to be more purpose-built for a particular view of the data, thus not really allowing more complex analytics. • Star schemas don't support many-to-many relationships between business entities - at least not very naturally.Typically these relationships are simplified in star schema to conform to the simple dimensional model.
  • 14. Snowflake Schema  Some dimension tables in the Snowflake schema are normalized.  The normalization splits up the data into additional tables.  Unlike Star schema, the dimensions table in a snowflake schema are normalized.
  • 15. Snowflake Schema time_key day day_of_the_week month quarter year Time location_key street city_key location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_key Item branch_key branch_name branch_type Branch supplier_key supplier_type Supplier city_key city state_or_province country city
  • 16. Snowflake Schema  For example, the item dimension table in star schema is normalized and split into two dimension tables, namely item and supplier table.  Advantage of Snowflake schema is that it is easier to update and maintain normalized structures.  Disadvantage of Snowflake schema is that it degrades the query performance because of additional joins..
  • 17. Snowflake Schema in Real-world Database
  • 18. SELECT B.Brand, G.Country, SUM(F.Units_Sold) FROM Fact_Sales F INNER JOIN Dim_Date D ON F.Date_Id = D.Id INNER JOIN Dim_Store S ON F.Store_Id = S.Id INNER JOIN Dim_Geography G ON S.Geography_Id = G.Id INNER JOIN Dim_Product P ON F.Product_Id = P.Id INNER JOIN Dim_Brand B ON P.Brand_Id = B.Id INNER JOIN Dim_Product_Category C ON P.Product_Category_Id = C.Id WHERE D.Year = 1997 AND C.Product_Category = 'tv' GROUP BY B.Brand, G.Country
  • 19. Benefits Snowflake Schema • The snowflake schema is in the same family as the star schema logical model. • In fact, the star schema is considered a special case of the snowflake schema. The snowflake schema provides some advantages over the star schema in certain situations, including: • Some OLAP multidimensional database modeling tools are optimized for snowflake schemas. • Normalizing attributes results in storage savings, the tradeoff being additional complexity in source query joins.
  • 20. Demerits • The primary disadvantage of the snowflake schema is that the additional levels of attribute normalization adds complexity to source query joins, when compared to the star schema. • Snowflake schemas, in contrast to flat single table dimensions, have been heavily criticized. Their goal is assumed to be an efficient and compact storage of normalized data but this is at the significant cost of poor performance when browsing the joins required in this dimension.[3] This disadvantage may have reduced in the years since it was first recognized, owing to better query performance within the browsing tools. • When compared to a highly normalized transactional schema, the snowflake schema's denormalization removes the data integrity assurances provided by normalized schemas. Data loads into the snowflake schema must be highly controlled and managed to avoid update and insert anomalies.
  • 21. Star Schema Snow Flake Schema  The star schema is the simplest data warehouse scheme.  In star schema, each of the dimensions is represented in a single table. It should not have any hierarchies between dims.  It contains a fact table surrounded by dimension tables. If the dimensions are de-normalized, we say it is a star schema design.  In star schema only one join establishes the relationship between the fact table and any one of the dimension tables.  A star schema optimizes the performance by keeping queries simple and providing fast response time. All the information about the each level is stored in one row.  It is called a star schema because the diagram resembles a star.  Snowflake schema is a more complex data warehouse model than a star schema.  In snow flake schema, at least one hierarchy should exist between dimension tables.  It contains a fact table surrounded by dimension tables. If a dimension is normalized, we say it is a snow flaked design.  In snow flake schema since there is relationship between the dimensions tables it has to do many joins to fetch the data.  Snowflake schemas normalize dimensions to eliminated redundancy. The result is more complex queries and reduced query performance.  It is called a snowflake schema because the diagram resembles a snowflake. Difference between Star Schema and Snow Flake Schema
  • 22. Fact Constellation Schema  A fact constellation has multiple fact tables.  It is also known as galaxy schema.  The following diagram shows two fact tables, namely sales and shipping.
  • 23. Fact Constellation Schema time_key day day_of_the_week month quarter year Time location_key street city province_or_state country location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch Shipping Fact Table time_key item_key shipper_key from_location to_location dollars_cost units_shipped shipper_key shipper_name location_key shipper_type shipper
  • 24. Fact Constellation Schema  The sales fact table is same as that in the star schema.  Shipping fact table contains three dimensions.  It is also possible to share dimension tables between fact tables.  For example item and location dimension tables are shared between the sales and shipping fact table.  It is a collection of schema in which multiple fact tables share dimension tables. Sophisticated application requires such schema.