0% found this document useful (0 votes)
12 views8 pages

8 Database Schema

The document discusses data warehousing schemas, including Star, Snowflake, and Galaxy schemas, which define how data is organized and related within a data warehouse. It explains the roles of fact and dimension tables, highlighting their characteristics and differences, such as normalization levels and redundancy. Additionally, it outlines key distinctions between the schemas and provides a comparison of fact and dimension tables.

Uploaded by

Sonu Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

8 Database Schema

The document discusses data warehousing schemas, including Star, Snowflake, and Galaxy schemas, which define how data is organized and related within a data warehouse. It explains the roles of fact and dimension tables, highlighting their characteristics and differences, such as normalization levels and redundancy. Additionally, it outlines key distinctions between the schemas and provides a comparison of fact and dimension tables.

Uploaded by

Sonu Saini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Data Warehousing – Schema

Schema is a logical description of the entire database. It includes the name and
description of records of all record types including all associated data-items and
aggregates. Much like a database, a data warehouse also requires to maintain a
schema. A database uses relational model, while a data warehouse uses Star,
Snowflake, and Fact Constellation schema.
 Data warehouse schema is a blueprint for how data will be stored and
managed. It includes definitions of terms, relationships, and the
arrangement of those terms and relationships.
 Star, galaxy, and snowflake are common types of data warehouse schema
that vary in the arrangement and design of the data relationships.
 Star schema is the simplest data warehouse schema and contains just one
central table and a handful of single-dimension tables joined together.
 Snowflake schema builds on star schema by adding sub-dimension tables,
which eliminates redundancy and reduces overhead costs.
 Galaxy schema uses multiple fact tables (Snowflake and Star use only one)
which makes it like an interlinked star schema. This nearly eliminates
redundancy and is ideal for complex database systems.
The basic components of all data warehouse schemas are fact and dimension
tables. The different combination of these two central elements compose almost
the entirety of all data warehouse schema designs.

Fact Table

A fact table aggregates metrics, measurements, or facts about business processes.


In this example, fact tables are connected to dimension tables to form a
schema architecture representing how data relates within the data warehouse.
Fact tables store primary keys of dimension tables as foreign keys within the fact
table.

Dimension Table

Dimension tables are non-denormalized tables used to store data attributes or


dimensions. As mentioned above, the primary key of a dimension table is stored
as a foreign key in the fact table. Dimension tables are not joined together.
Instead, they are joined via association through the central fact table.
What Is a Star Schema in a Data Warehouse?

The star schema in a data warehouse is historically one of the most


straightforward designs. This schema follows some distinct design parameters,
such as only permitting one central table and a handful of single-dimension tables
joined to the table. In following these design constraints, star schema can
resemble a star with one central table, and five dimension tables joined (thus
where the star schema got its name).

Star Schema is known to create denormalized dimension tables – a database


structuring strategy that organizes tables to introduce redundancy for improved
performance. Denormalization intends to introduce redundancy in additional
dimensions so long as it improves query performance.
Characteristics of the Star Schema:
 Star data warehouse schemas create a denormalized database that enables
quick querying responses
 The primary key in the dimension table is joined to the fact table by the
foreign key
 Each dimension in the star schema maps to one dimension table
 Dimension tables within a star scheme are not to be connected directly
 Star schema creates denormalized dimension tables

What Is a Snowflake Schema?

The Snowflake Schema is a data warehouse schema that encompasses a logical


arrangement of dimension tables. This data warehouse schema builds on the star
schema by adding additional sub-dimension tables that relate to first-order
dimension tables joined to the fact table.

Just like the relationship between the foreign key in the fact table and the primary
key in the dimension table, with the snowflake schema approach, a primary key
in a sub-dimension table will relate to a foreign key within the higher order
dimension table.

Snowflake schema creates normalized dimension tables – a database structuring


strategy that organizes tables to reduce redundancy. The purpose of normalization
is to eliminate any redundant data to reduce overhead.
Characteristics of the Snowflake Schema:
 Snowflake Schema are permitted to have dimension tables joined to other
dimension tables
 Snowflake Schema are to have one fact table only
 Snowflake Schema create normalized dimension tables
 The normalized schema reduces required disk space for running and
managing this data warehouse
 Snowflake Scheme offer an easier way to implement a dimension

What Is a Galaxy Schema?

The Galaxy Data Warehouse Schema, also known as a Fact Constellation


Schema, acts as the next iteration of the data warehouse schema. Unlike the Star
Schema and Snowflake Schema, the Galaxy Schema uses multiple fact tables
connected with shared normalized dimension tables. Galaxy Schema can be
thought of as star schema interlinked and completely normalized, avoiding any
kind of redundancy or inconsistency of data.
Characteristics of the Galaxy Schema:
 Galaxy Schema is multidimensional acting as a strong design consideration
for complex database systems
 Galaxy Schema reduces redundancy to near zero redundancy as a result of
normalization
 Galaxy Schema is known for high data quality and accuracy and lends to
effective reporting and analytics

Key Differences Between Star, Snowflake, and Galaxy Schema

Star Schema Snowflake Schema Galaxy Schema


Single Fact Table Single Fact Table Multiple Fact Tables
connected to multiple connects to multiple connects to multiple
dimension tables with dimension tables that dimension tables that
no sub-dimension connects to multiple connects to multiple sub-
Elements tables sub-dimension tables dimension tables
Normalization De-normalized Normalized Normalized
Multiple dimension Multiple dimension Multiple dimension
Number of tables map to a single tables map to multiple tables map to multiple
Dimensions Fact Table dimension tables Fact Tables
Data
Redundancy High Low Low
Decreased performance
Decreased performance compared to Star and
Fewer foreign keys compared to Star Snowflake. Used for
resulting in increased Schema from higher complex data
Performance performance number of foreign keys aggregation.
More complicated
compared to Star Most complicated to
Schema – can be more understand. Reserved for
Simple, designed to challenging to highly complex data
Complexity be easy to understand understand structures
Low disk space usage
compared to the level of
Higher disk space due Lower disk space due to sophistication due to the
Storage Usage to data redundancy limited data redundancy limited data redundancy
One Fact Table only,
multiple sub- Multiple Fact Tables
Design One Fact Table only, dimensions are permitted, only first level
Limitations no sub-dimensions permitted dimensions are permitted
Difference between Fact Table and Dimension Table:

Fact Table or Reality


Table Dimension Table
S.NO

Fact table contains the


Dimension table contains the attributes on
1. measuring of the attributes of a
that truth table calculates the metric.
dimension table.

In fact table, There is less While in dimension table, There is more


2.
attributes than dimension table. attributes than fact table.

In fact table, There is more While in dimension table, There is less


3.
records than dimension table. records than fact table.

While dimension table forms a horizontal


4. Fact table forms a vertical table.
table.

The attribute format of fact


While the attribute format of dimension
5. table is in numerical format and
table is in text format.
text format.

6. It comes after dimension table. While it comes before fact table.

The number of fact table is less


While the number of dimension is more
7. than dimension table in a
than fact table in a schema.
schema.

While the main task of dimension table is


It is used for analysis purpose
8. to store the information about a business
and decision making.
and its process.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy