DEV Community

Ajani luke Kariuki
Ajani luke Kariuki

Posted on

Schemas and Data modeling in Power bi

Table of contents

  • Star schema

  • Snowflake schema

  • Relationships

  • Facts

  • Dimention Tables

star schema vs snowflake schema

A star schema is defined as the simplest data warehouse schema where one or more fact tables reference any number of dimension tables in a star-like structure.

snowflake schemaIs a more normalized version of the star schema where dimension tables are broken down into further tables.

Fact Tables: Tall and narrow, containing measurable, quantitative data (e.g., unit price, quantity).

_*Dimension Tables: *_Short and wide, containing descriptive attributes used for filtering and grouping (e.g., product name, location).

Relationships: Power BI typically uses 1-to-many relationships, where dimension tables connect to the fact table, ensuring data integrity. 

Schemas organize data into a central, narrow fact table (containing measures/keys) connected to surrounding dimension tables (describing entities) using one-to-many relationships.

Power BI: Beginner’s Guide to Data Modeling and Schemas — Summary

Overview

Modern organisations rely heavily on insights derived from raw data to guide decision-making and remain competitive. Business Intelligence (BI) tools play a crucial role in transforming this data into meaningful insights, and Power BI stands out as a powerful, visualisation-friendly solution.

Power BI enables both technical and non-technical users to understand data through intuitive visuals such as charts, graphs, and dashboards. Central to its effectiveness are data models and schemas, which structure data for efficient analysis.


What is Business Intelligence (BI)?

Business Intelligence refers to tools, techniques, and processes used to analyse organisational data and support strategic and operational decisions.

Power BI supports BI by providing:

  • Descriptive analytics
  • Interactive reports
  • Dashboards for decision-makers

Well-designed data models ensure that insights are accurate, timely, and cost-effective.


What is a Schema in Power BI?

A schema defines how data is structured and how tables relate to each other within a data model.

Schemas:

  • Improve query performance
  • Enhance reporting efficiency
  • Enable better data analysis

The two main schemas used in Power BI are:

  • Star Schema
  • Snowflake Schema

Star Schema

The Star Schema is the most common and beginner-friendly schema in Power BI. It consists of:

  • One central fact table
  • Multiple surrounding dimension tables

The structure resembles a star.

Key Features

  • Simplicity: Easy to understand and use
  • Flexibility: New dimensions or facts can be added easily
  • Performance: Fewer table joins result in faster queries

Dimension Tables vs Fact Tables

Dimension Tables

Dimension tables store descriptive attributes that provide context to data.

Characteristics:

  • Contain primary keys
  • Include descriptive fields (e.g., product name, category)
  • Used for filtering and grouping data

Example attributes:

  • Product Name
  • Category
  • Price

Fact Tables

Fact tables store quantitative, measurable data related to business activities.

Characteristics:

  • Contain foreign keys linking to dimension tables
  • Store numerical measures (e.g., sales amount, quantity sold)
  • Each row represents a transaction or event

Key Differences

Aspect Dimension Table Fact Table
Purpose Provides context Records transactions
Structure Fewer rows, more attributes Many rows, fewer attributes
Data Type Descriptive Numerical

Snowflake Schema

The Snowflake Schema is an extension of the star schema where dimension tables are further divided into sub-dimensions.

Strengths

  • Faster data retrieval in some cases
  • Improved data integrity
  • Better data normalization

Weaknesses

  • Higher initial setup cost
  • More complex structure
  • Less flexible for future changes

Importance of Good Data Models

Well-designed data models are critical for:

  • Accurate reporting
  • High-performance dashboards
  • Reliable KPI tracking
  • Effective decision-making

Without proper data modeling, organisations risk inaccurate insights and poor strategic execution.


Conclusion

Power BI leverages strong data modeling principles—particularly star and snowflake schemas—to make data analysis accessible, efficient, and impactful. Creating good data models is essential for building reliable dashboards and enabling organisations to make informed, data-driven decisions.

Top comments (0)