0% found this document useful (0 votes)
4 views

Multi Dimensional Data Model[1]

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Multi Dimensional Data Model[1]

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Multi Dimensional

Data model
T Mallika
Assistant Professor
CSE(AI&ML, DS)
ANITS
From Tables and Spreadsheets
to Data cubes:
• Data warehouses and OLAP tools are based on a
multidimensional data model.
• This model views data in the form of a data cube.
• A data cube allows data to be modeled and
viewed in multiple dimensions.
• It is defined by Dimensions and facts.
29/12/2025 T Mallika 2
Dimensions
•Dimensions are the perspectives or entities with
respect to which an organization wants to keep
records.
•Example: All Electronics may create a sales data
warehouse in order to keep records of the store’s
sales with respect to the dimensions time, item,
branch & location.
• These dimensions allow the store to keep track of
things like monthly sales of items and the branches
and locations at which the items were sold
29/12/2025 T Mallika 3
Dimension table
• Each dimension may have a table associated with it,
called a dimension table, which further describes the
dimension.
• For example, a dimension table for item may contain
the attributes item_name, brand, and type.
• Dimension tables can be specified by users or experts,
or automatically generated and adjusted based on data
distributions.
29/12/2025 T Mallika 4
Facts
• Facts are numerical measures.
• Facts are quantities by which we want to analyze
relationships between dimensions.
• Examples: dollars_sold (sales amount in dollars),
units_sold (number of units sold) and
amount_budgeted.

29/12/2025 T Mallika 5
Fact Table:
• A multidimensional data model is typically organized
around a central theme, such as sales. This theme is
represented by a fact table.
• The Fact Table contains the names of the facts or
measures, as well as keys to each of the related
dimension tables.

29/12/2025 T Mallika 6
2-D View of Sales DATA for All Electronics According to time and item

location = “Vancouver”
time Item(type)
(quarter) home computer phone security
entertainment
Q1 605 825 14 400
Q2 680 952 31 512
Q3 812 1023 30 501
Q4 927 1038 38 580
• Note: The sales are from branches located in the city of Vancouver. The
measure displayed is dollars_sold (in thousands)
29/12/2025 T Mallika 7
3-D View of Sales Data for AllElectronics According to time, item, and location

location = “New location = location =


location = “Chicago”
York” “Toronto” “Vancouver”
item item item item
time hom
com phon home comp phon home comp phon home comp phon
e sec. sec. sec. sec.
p. e ent. . e ent. . e ent. . e
ent.
Q1 0854 882 89 623 1087 0968 38 0872 818 746 43 591 605 0825 14 400

Q2 0943 890 64 698 1130 1024 41 0925 894 769 52 682 680 0952 31 512

Q3 1032 924 59 789 1034 1048 45 1002 940 795 58 728 812 1023 30 501

Q4 1129 992 63 870 1142 1091 54 0984 978 864 59 784 927 1038 38 580

• Note: The measure displayed is dollars_sold (in thousands).


29/12/2025 T Mallika 8
A 3-D data cube representation of the data in Table 4.3, according to time,
item, and location. The measure displayed is dollars_sold (in thousands).

29/12/2025 T Mallika 9
A 4-D data cube representation of sales data, according to time, item, location,
and supplier. The measure displayed is dollars_sold (in thousands). For improved
readability, only some of the cube values are shown.

29/12/2025 T Mallika 10
• Given a set of dimensions, we can generate a cuboid
for each of the possible subsets of the given
dimensions.
• The result would form a lattice of cuboids, each
showing the data at a different level of summarization,
or group-by. The lattice of cuboids is then referred to
as a data cube.
• The cuboid that holds the lowest level of
summarization is called the Base Cuboid.
• The 0-D Cuboid, which holds the highest level of
summarization is called the Apex Cuboid.
29/12/2025 T Mallika 11
Lattice of cuboids, making up a 4-D data cube for time, item, location,
and supplier. Each cuboid represents a different degree of summarization.

29/12/2025 T Mallika 12
Star, Snowflake and Fact Constellations:
Schemas for Multidimensional Databases
• The entity-relationship data model is commonly used in
the design of relational databases, where a database schema
consists of a set of entities and the relationships between
them. Such a data model is appropriate for online
transaction processing.
• A data warehouse requires a concise, subject-oriented
schema that facilitates online data analysis.
• The most popular data model for a data warehouse is a
multidimensional model. Such a model can exist in the
form of a star schema, a snowflake schema or a fact
constellation schema.
29/12/2025 T Mallika 13
Star Schema:
Star Schema in which the data warehouse contains
1. A Large central table (fact table) containing the bulk of the data with
no redundancy.
2. A set of smaller attendant tables(dimension tables), one for each
dimension.

Example:
A Star schema for All Electronics sales is given in next slide:
Dimension Tables: Time, Item, Branch, Location.
Fact Table: Sales
Measures: Dollars_sold, and Units_sold

29/12/2025 T Mallika 14
Star schema of a sales data warehouse:

29/12/2025 T Mallika 15
Snowflake Schema:
• The snowflake schema is a variant of the star schema
model, where some dimension tables are normalized,
thereby further splitting the data into Additional tables.
• The major difference between the snowflake and star
schema models is that the dimension tables of the
snowflake model may be kept in normalized form to reduce
redundancies.
• For example, A snowflake schema for All Electronics sales
is given as:
29/12/2025 T Mallika 16
Snowflake schema of a sales data warehouse:

*Two Dimension tables(location, item) are normalized in the star


schema, the obtained result is the snowflake schema.
29/12/2025 T Mallika 17
Fact Constellation Schema:
• Sophisticated applications may require multiple fact
tables to share dimension tables.
• This kind of schema can be viewed as a collection of
stars and hence is called a Galaxy Schema or a Fact
Constellation.
• Example: A fact constellation schema is shown below:
➢Two fact tables: Sales and shipping
• Fact constellation schema allows dimension tables to be
shared between fact tables.
29/12/2025 T Mallika 18
Fact constellation schema of a sales and shipping data
warehouse:

29/12/2025 T Mallika 19
• https://www.sciencedirect.com/topics/computer-
science/multidimensional-data-model

29/12/2025 T Mallika 20
THANK YOU

29/12/2025 T Mallika 21

You might also like