What you will be able to do
- Explain why Databricks recommends star or snowflake schemas over heavily normalized 3NF models for new analytical workloads
- Identify fact tables and dimension tables and describe what each holds
- Recognise a snowflake schema as a star schema whose dimensions are split into subdimensions
- Weigh the storage-versus-join trade-off between star and snowflake schemas
Key concept
Fact/dimension split (dimensional modeling) — Analytical data is organised into narrow fact tables holding events and numeric measures, plus dimension tables holding descriptive context about business entities. Facts point to dimensions by key. Star and snowflake schemas are both arrangements of this split.
1.Why Databricks favours star-like models over 3NF
The data model you pick affects query performance, compute costs and storage costs. Databricks says it can work well with any data model. If you are migrating an existing model, it advises you to check its performance before you redesign it. For new lakehouses, though, the guidance is clear: avoid heavily normalized designs such as 3NF.
The reason is joins. The Databricks optimizer tries to plan joins well, but it can struggle when one query has to join results from many tables. There is a second, less obvious cost. When a filter is on a column in a *different* table, the optimizer may fail to skip records and scan the whole table instead. A heavily normalized model spreads attributes across many tables, so it causes both problems more often.
Star and snowflake schemas run well on Databricks because standard queries hit fewer joins and there are fewer keys to keep in sync. Wider tables also help with data skipping. When more fields sit in one table, the optimizer can use file-level statistics to skip large amounts of data.
Checkpoint 1 of 6· Check yourself
Besides having fewer joins, why does putting more data fields in a single table help query performance on Databricks?
Databricks names data skipping as the benefit. When filter columns live in the same table, file-level statistics let the optimizer skip files. Keys are never enforced, and the sources say nothing about automatic caching.
“having more data fields in a single table allows the query optimizer to skip large amounts of data using file-level statistics”Source: docs.databricks.com
Sources1
2.The star schema: one fact table, many dimensions
Dimensional modeling uses two kinds of table:
- Fact tables hold the events or measurements you care about, such as orders, clicks or sales. Each row is one occurrence of the event, described mostly by keys and numeric measures. - Dimension tables hold the descriptive context around those events, such as customers, products or dates. Each row is one business entity.
Put one fact table in the middle and join it out to several dimensions through their keys, and you have a star schema. Analysts and BI tools find it easy to query, and engineers find it easy to reason about, because each table has one clear job.
Databricks advises keeping facts narrow: mostly keys and numeric measures. Descriptive detail comes in through joins at query time. In the fact table below, each _id or date column is a foreign key to a dimension, and quantity and amount are the measures.
CREATE OR REFRESH STREAMING TABLE fact_orders
COMMENT "One row per order line, keyed to dimensions"
AS SELECT
order_id,
customer_id, -- foreign key to dim_customer
product_id, -- foreign key to dim_product
order_date, -- foreign key to dim_date
quantity,
amount
FROM STREAM(orders_silver);Checkpoint 2 of 6· Match them up
Match each star-schema element to its description
Tap a term, then the definition that fits it.
Facts record what happened and how much. Dimensions describe who, what and when. A star schema is the shape you get by joining one fact table to its dimensions.
“Dimension tables hold the descriptive context around those events, such as customers, products, or dates.”Source: docs.databricks.com
Checkpoint 3 of 6· Exam question
A BI team is building a Gold-layer table set to power an AI/BI dashboard that sales managers will refresh throughout the day. They want the dashboard's queries to run with as few joins as possible, even if that means storing some dimension attributes redundantly. Which modeling approach best fits this goal?
Correct answer: A — A star schema with one central fact table and denormalized dimension tables joined directly to it, trading storage redundancy for fewer joins per query.
- A. A star schema denormalizes dimension tables so each one joins directly to the fact table with a single hop, which is exactly the low-join, read-optimized structure a frequently refreshed dashboard needs. The redundancy tradeoff is intentional and matches the team's stated priority.
- B. Splitting dimensions into subdimensions reduces redundancy but adds extra join hops for every query that needs the normalized attributes, which works against the team's goal of minimizing joins for a fast-refreshing dashboard.
- C. Data vault's hub/link/satellite structure is built for historical tracking and adapting to changing source systems, not for minimizing joins on read-heavy reporting queries, so it does not fit this dashboard's requirement.
- D. A transactional third-normal-form layout is designed to minimize write anomalies and redundancy, not to serve fast analytical reads, so it would require more joins than the team wants for dashboard queries.
Sources2
3.The snowflake schema: dimensions split into subdimensions
A snowflake schema extends a star schema. It still has a central fact table connected to dimensions through foreign keys. The difference is that dimension tables are split into related subdimensions, which makes the model more normalized. For example, product, category and department attributes can each go into their own linked table. This reduces redundancy and storage. The name comes from the shape of its entity-relationship diagram.
The Databricks metric-view tutorial shows the pattern on the TPC-H sample data. orders is the fact table and customer is a dimension. nation, a country or region reference, is not joined to orders directly. You reach it *through* customer on c_nationkey = n_nationkey. Nesting the nation join inside the customer join is what makes nation a subdimension of customer.
source: SELECT * FROM samples.tpch.orders
joins:
- name: customer
source: samples.tpch.customer
'on': o_custkey = c_custkey
joins:
- name: nation
source: samples.tpch.nation
'on': c_nationkey = n_nationkeyCheckpoint 4 of 6· Check yourself
In the TPC-H example, what makes the model a snowflake schema rather than a star schema?
A star schema joins every dimension directly to the fact table. A snowflake schema splits a dimension further, here customer to nation. That nested join is the defining feature, not the table count or the many-to-one cardinality.
“Nesting the join under customer models nation as a subdimension of customer.”Source: docs.databricks.com
Checkpoint 5 of 6· Exam question
A retailer's `dim_product` table repeats the full category, subcategory, and department hierarchy on every product row, and the table has grown large enough that storage cost and duplicate-value maintenance have become a real concern. The analytics team decides to split that hierarchy into separate `dim_category`, `dim_subcategory`, and `dim_department` tables linked by foreign keys. What modeling pattern does this change produce?
Correct answer: A — A snowflake schema, since the dimension is normalized into related subdimension tables that must be joined together to reconstruct the full hierarchy.
- A. Breaking a denormalized dimension into linked subdimension tables to remove repeated hierarchy values is the defining move of a snowflake schema, which trades storage redundancy for additional joins. This scenario describes exactly that normalization step.
- B. A star schema keeps dimensions denormalized in a single table per dimension, so splitting one dimension into three linked tables moves away from a star pattern and adds joins rather than removing them.
- C. Data vault modeling requires the specific hub, link, and satellite table roles built around business keys and load-date history, not merely splitting a dimension hierarchy into related lookup tables.
- D. A fact constellation describes multiple fact tables sharing conformed dimensions, but this scenario only describes restructuring one dimension table, with no second fact table introduced.
4.Choosing between star and snowflake
Both schemas perform well on Databricks next to 3NF, because both keep joins and key synchronisation manageable. Between the two, the trade-off is redundancy against joins. A star schema is denormalized: it repeats descriptive data across dimension rows, and in return queries run faster. A snowflake schema stores data more efficiently but adds joins to read-heavy queries.
| Aspect | Star schema | Snowflake schema |
|---|---|---|
| Dimension structure | Each dimension joins directly to the fact table | Dimensions broken into related subdimensions |
| Normalization | Denormalized, more data redundancy | More normalized, less redundancy |
| Storage | Uses more space because data is duplicated | Saves space |
| Joins in queries | Fewer | Usually more |
| Read-heavy query performance | Faster | Can be more complex and slower |
Checkpoint 6 of 6· Check yourself
A team's top priority is the fastest possible dashboard queries, and they can accept some duplicated descriptive data. Which model fits best?
Star schemas accept duplicated data in exchange for faster queries. Snowflake and 3NF go the other way, and Databricks says the model you choose does affect performance and cost.
“Denormalized data models like star schemas have more data redundancy (duplication of data), which makes query performance faster at the cost of duplicated data.”Source: www.databricks.com
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Because a snowflake schema is more normalized, it is the faster choice for read-heavy BI analytics.Why is that wrong?
Normalization saves storage, but it usually adds joins, which makes read-heavy queries more complex and slower. The denormalized star schema is the faster option.
Covered in Choosing between star and snowflake
2.A traditional 3NF model is the recommended starting point for a new Databricks lakehouse.Why is that wrong?
For new lakehouses, Databricks recommends against heavily normalized models such as 3NF. Star and snowflake schemas perform better because queries need fewer joins and there are fewer keys to keep in sync.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“The optimizer can also fail to skip records in a table when filter parameters are on a field in another table”
↩︎ Why Databricks favours star-like models over 3NF“Databricks can work well with any data model.”
↩︎ Why Databricks favours star-like models over 3NF“fewer joins present in standard queries and fewer keys to keep in sync”
↩︎ Choosing between star and snowflake“fewer joins present in standard queries and fewer keys to keep in sync”
↩︎ Exam trap 2“Databricks recommends against using a heavily normalized model such as third normal form (3NF).”
↩︎ Prediction“having more data fields in a single table allows the query optimizer to skip large amounts of data using file-level statistics”
↩︎ Checkpoint - 2.
“Fact tables hold the events or measurements you care about, such as orders, clicks, or sales.”
↩︎ The star schema: one fact table, many dimensions“place one fact table in the middle and join it out to several dimension tables through their keys”
↩︎ The star schema: one fact table, many dimensions“Keep facts narrow (mostly keys and numeric measures) and use joins to pull in descriptive detail at query time”
↩︎ The star schema: one fact table, many dimensions“Facts reference their dimensions by key rather than duplicating descriptive attributes.”
↩︎ Key concept“Dimension tables hold the descriptive context around those events, such as customers, products, or dates.”
↩︎ Checkpoint - 3.https://www.databricks.com/blog/what-is-snowflake-schemaSecondary source
“dimension tables are broken into related subdimensions, creating a more normalized, snowflake shaped model.”
↩︎ The snowflake schema: dimensions split into subdimensions“This structure can reduce data redundancy and storage by organizing attributes such as product, category and department into separate linked tables.”
↩︎ The snowflake schema: dimensions split into subdimensions“a snowflake schema saves space but usually requires more joins”
↩︎ Choosing between star and snowflake“can make queries more complex and slower for read heavy analytics”
↩︎ Exam trap 1“a snowflake schema saves space but usually requires more joins”
↩︎ Prediction“Denormalized data models like star schemas have more data redundancy (duplication of data), which makes query performance faster at the cost of duplicated data.”
↩︎ Checkpoint - 4.
“Nesting the join under customer models nation as a subdimension of customer.”
↩︎ The snowflake schema: dimensions split into subdimensions