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

Schemas for Multidimensional Data Models

need the answers of the scenarios kindly

Uploaded by

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

Schemas for Multidimensional Data Models

need the answers of the scenarios kindly

Uploaded by

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

Schemas for Multidimensional Data Models

Stars, Snowflakes, and Fact Constellations

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 1 / 18
Schemas for Multidimensional Data Models

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

Entity data model is appropriate for online transaction processing.

A data warehouse, requires a concise, subject-oriented schema


that facilitates online data analysis

The popular data model for a data warehouse is a multidimensional


model, which can exist in the form of a star schema, a snowflake
schema, or a fact constellation schema.

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 2 / 18
Star schema: Components
The Components of a Star Schema include:
1 Fact Table:

▶ Central table in the schema.


▶ Contains quantitative data, usually numerical, such as sales, revenue,
or counts.
▶ Columns typically include: Primary keys (composite): Derived from the
associated dimension tables.
▶ Measures: Metrics or facts (e.g., sales amount, total cost). Foreign
keys: References to the primary keys of dimension tables.
2 Dimension Tables:
▶ Surround the fact table and are linked to it via foreign keys.
▶ Surround the fact table and are linked to it via foreign keys.
▶ Contain descriptive attributes (dimensions) that provide context to the
facts, such as:
⋆ Time Dimension: Date, month, quarter, year.
⋆ Time Dimension: Date, month, quarter, year.
⋆ Product Dimension: Product name, category, brand.
⋆ Customer Dimension: Customer name, location, demographic
information.
⋆ Location Dimension: Country, region, city.
Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 3 / 18
Structure of a Star Scheme

The schema graph resembles a starburst, with the dimension tables


displayed in a radial pattern around the central fact table.

A star schema for AllElectronics sales is shown in Figure 1 below


(next slide). Sales are considered along four dimensions: time, item,
branch, and location. The schema contains a central fact table for
sales that contains keys to each of the four dimensions, along with
two measures: dollars sold and units sold.

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 4 / 18
Star Schema: Diagram Illustration

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 5 / 18
The Snowflake Schema
The Snowflake Schema is an extension of the Star Schema used in data
warehousing. It is designed to normalize the data structure, reducing data
redundancy and improving storage efficiency. Its components include
1 Fact Table:

▶ Similar to the Star Schema, the central table holds quantitative metrics
(facts) and foreign keys that reference dimension tables.
2 Dimension Tables:
▶ In the Snowflake Schema, dimension tables are normalized into
multiple related tables.
▶ These related tables are organized in a hierarchical structure, breaking
down attributes into separate tables to eliminate redundancy.
A snowflake schema for AllElectronics sales is given in Figure 2 below(next
slide). Here, the sales fact table is identical to that of the star schema in
Figure 1. The main difference between the two schemas is in the definition
of dimension tables. The single dimension table for item in the star
schema is normalized in the snowflake schema, resulting in new item and
supplier tables.
Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 6 / 18
Snowflake schema of a sales data warehouse: A Diagram
Illustration

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 7 / 18
Comparison: Star Schema vs. Snowflake Schema

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 8 / 18
A Fact constellation Schema
The Fact Constellation Schema (also known as a Galaxy Schema) is a
more advanced data warehouse schema design that consists of multiple
fact tables sharing common dimension tables. It is suitable for complex
applications where data is analyzed across different business processes or
multiple fact tables are required. Its components include the following:
1 Multiple Fact Tables.

▶ Each fact table represents a specific business process or subject of


analysis.
▶ Fact tables can share some common dimensions but have distinct
measures.
2 Shared Dimension Tables.
▶ Common dimensions (e.g., time, customer, location) are shared across
multiple fact tables.
▶ Dimension tables provide context to the facts and maintain consistency
across different fact tables.
Example A fact constellation schema is shown in Figure 3 (next slide).
This schema specifies two fact tables, sales and shipping. The sales table
definition is identical to that of the star schema (Figure 1).
Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 9 / 18
A fact constellation schema. Shown in the Figure

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 10 / 18
Assignments

1 4.2.3 Dimensions: The Role of Concept Hierarchies- Reading


Assignment.

2 Using the use case examples (The two shared handouts on data
warehousing, in groups of 3, develop warehouse models based on the
above discussed concepts (Schemas for multidimensional Data
models) a group can pick from any of the following scenarios
(Provided on the next slides) ).

3 Each Group to select only one Scenario for their assignment.

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 11 / 18
Assignment Scenario 1: Retail and E-Commerce

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 12 / 18
Assignment Scenario 2: Healthcare

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 13 / 18
Assignment Scenario 3: Finance and Banking

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 14 / 18
Assignment Scenario 4: Telecommunication

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 15 / 18
Assignment Scenario 5: Manufacturing

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 16 / 18
Assignment Scenario 6: Energy and Utilities

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 17 / 18
Assignment Scenario 7: Transportation and Logistics

Stars, Snowflakes, and Fact Constellations Schemas for Multidimensional Data Models Dr Tombe. 26.Nov.24 18 / 18

You might also like