By Rohit Ray · Independent educational lesson · Explore this visual lab

Module 13 · Lesson 4 of 11Detailed study · about 22 min

Star schema, snowflake schema and Data Vault

A model shape organizes relationships for a purpose. Choose a shape by its consumers, historical requirements and maintenance cost.

Understand the idea

A sales star might link a fact to customer, product and date dimensions. Reports need fewer joins and business concepts are easy to discover. A snowflake schema could separate a product’s category into its own related table to manage that hierarchy centrally.

Key ideas in simple English
ConceptWhat it means
Star schemaFacts connect directly to descriptive dimensions.
Snowflake schemaDimension attributes are normalized into related tables.
Data Vault hub/linkHubs identify business keys; links describe relationships.
Data Vault satelliteStores descriptive history and source context.

A concrete example

A sales star might link a fact to customer, product and date dimensions. Reports need fewer joins and business concepts are easy to discover. A snowflake schema could separate a product’s category into its own related table to manage that hierarchy centrally.

Remember: Model shape follows business use and history needs; the platform name does not dictate it.

Explain it step by step · full theory

Understand the concept

A sales star might link a fact to customer, product and date dimensions. Reports need fewer joins and business concepts are easy to discover. A snowflake schema could separate a product’s category into its own related table to manage that hierarchy centrally.

The term snowflake schema is a modeling pattern; it is not required simply because you use the Snowflake platform. Both normalized and denormalized designs can run there. Avoid claiming one shape is always fastest without workload evidence.

Apply it in practice

Data Vault separates keys, relationships and changing descriptive evidence. It can help integrate multiple sources and preserve lineage, but requires consistent loading standards and usually business-facing marts. A hub alone is not a reporting dimension.

The example joins a small star at customer grain. A real dimension must have one matching version per fact; a join to all historical versions would multiply revenue. The final lab makes that temporal match explicit.

Words used in this lesson
Star schema
Facts connect directly to descriptive dimensions.
Snowflake schema
Dimension attributes are normalized into related tables.
Data Vault hub/link
Hubs identify business keys; links describe relationships.
Data Vault satellite
Stores descriptive history and source context.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 2

Star schema, snowflake schema and Data Vault

Star schema
Snowflake schema
Data Vault satellite

Understand the flow

A model shape organizes relationships for a purpose. Choose a shape by its consumers, historical requirements and maintenance cost.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Understand the flow

    A model shape organizes relationships for a purpose. Choose a shape by its consumers, historical requirements and maintenance cost.

  2. Apply the contract

    Model shape follows business use and history needs; the platform name does not dictate it.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Manual learning exercise. Production deployment needs source-specific contracts, access controls, orchestration and operational monitoring.

Star schema, snowflake schema and Data Vault — SQL example

Definition: A model shape organizes relationships for a purpose. Choose a shape by its consumers, historical requirements and maintenance cost.

When to use: Follow the isolated customer-history lab in lesson order.

Example: Delhi 50, Pune 100. Each fact matches one dimension row.

SQL · example
WITH f(CUSTOMER_ID,AMOUNT) AS (SELECT * FROM VALUES ('C1',100),('C2',50)), d(CUSTOMER_ID,CITY) AS (SELECT * FROM VALUES ('C1','Pune'),('C2','Delhi')) SELECT CITY,SUM(AMOUNT) AS REVENUE FROM f JOIN d USING(CUSTOMER_ID) GROUP BY CITY ORDER BY CITY;

What to expect and why

Delhi 50, Pune 100. Each fact matches one dimension row.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Must a Snowflake project use a snowflake-schema model?

Try it yourself

Explain with the example: Must a Snowflake project use a snowflake-schema model?

Compare your reasoning

Model shape follows business use and history needs; the platform name does not dictate it.

Official sources and curriculum

Module 13 · See module scope