CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 8 · Lesson 35/39

    Data Vault, Medallion Layers, and Gold-Layer Star Schemas

    Apply industry-standard data modeling techniques, such as star, snowflake, and data vault schemas, to analytical workloads.

    9 min read
    2.56% of exam
    4 sources
    Published 3 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Place data vault, 3NF-like and star schema models in the right medallion layer
    • Explain why write-optimized models suit silver and read-optimized models suit gold
    • Build gold-layer dimensions and facts with the dataset types and keys Databricks recommends
    • Avoid the surrogate-key and constraint pitfalls that break fact-to-dimension joins

    1.The medallion architecture as a map for data models

    The medallion architecture organises lakehouse data into layers of increasing quality: bronze (raw), silver (validated) and gold (enriched). Data improves in structure and quality as it moves from Bronze to Silver to Gold. Databricks recommends this approach as a best practice, but it is not a requirement.

    Each layer does a different job, and that job decides which data model belongs there. For analytical workloads, the key row of the Databricks comparison is *what happens in each layer*. Gold is the layer defined by dimensional modeling and aggregation, which is where star schemas live.

    What each medallion layer does and who uses it
    LayerWhat happens hereTypical users
    Bronze (raw)Raw data ingestionData engineers, data operations, compliance and audit teams
    Silver (validated)Data cleaning and validationData engineers, data analysts, data scientists
    Gold (enriched)Dimensional modeling and aggregationBusiness analysts and BI developers, data scientists and ML engineers, executives, operational teams

    The gold layer holds refined, often aggregated datasets that map to business functions. You model it with a dimensional model by establishing relationships and defining measures. Because gold models a business domain, some organisations build more than one gold layer, for example for HR, finance and IT. Gold also holds pre-aggregated materialized views, so analysts don't have to rebuild common measures themselves.

    A gold-layer pre-aggregation: weekly bookings and revenue as a materialized viewsql
    CREATE OR REPLACE MATERIALIZED VIEW main.example_output.weekly_bookings AS
    SELECT date_trunc('week', check_in) AS week,
           property_id,
           status,
           count(*) AS total_bookings,
           sum(total_amount) AS total_revenue
    FROM samples.wanderbricks.bookings
    GROUP BY week, property_id, status

    Checkpoint 1 of 5· Check yourself

    In the Databricks medallion architecture, which layer is characterised by dimensional modeling and aggregation?

    Sources1

    2.Data vault and normalized models in the silver layer

    Data modeling often starts in the silver layer. Databricks lists several ways to represent nested or semi-structured data there, and one of them is to flatten the schema or normalize the data into multiple tables. The Databricks medallion blog describes silver as having more 3rd-Normal-Form-like models and names Data Vault-like, write-performant models as suitable for this layer. Gold then uses de-normalized, read-optimized models with fewer joins. That is where Kimball-style star schemas and Inmon-style data marts fit.

    This resolves the apparent conflict with the advice to avoid 3NF. Normalized and data vault models optimise for writing and integrating data in silver. Star schemas optimise for analysts reading data in gold.

    Limit of the sources: the provided Databricks material places data vault in the silver layer and calls it write-performant. It does not describe data vault's internal structure or how to build one on Databricks, so this lesson doesn't either.

    Checkpoint 2 of 5· Match them up

    Match each data model to the medallion layer where Databricks material places it

    Tap a term, then the definition that fits it.

    Checkpoint 3 of 5· Exam question

    A bank ingests customer and account data from a dozen source systems that change frequently as new product lines are added, and compliance requires a full, queryable audit trail of every historical value each attribute ever held. The data engineering team needs a Silver-layer design that absorbs source-system changes with minimal rework and preserves that history natively. Which modeling technique should they apply?

    Sources12

    3.Building the gold-layer star schema

    A star schema puts one fact table of events and measures at the centre, joined by key to dimension tables of descriptive context. In Lakeflow pipelines it fits naturally at the gold layer. Bronze and silver handle ingestion and cleaning, and gold materializes the facts and dimensions that BI tools query directly. Databricks recommends a dataset type for each kind of table:

    - Dimensions are materialized views built from cleaned silver data, one row per business entity. If you need history, use a streaming table with AUTO CDC and STORED AS SCD TYPE 2. - Facts are streaming tables fed incrementally from silver, so aggregates stay close to real time. - dim_date is a materialized view generated with sequence() and explode() over a date range. You don't ingest it from a source.

    A customer dimension as a gold-layer materialized view over silver datasql
    CREATE OR REFRESH MATERIALIZED VIEW dim_customer
    COMMENT "Customer dimension"
    AS SELECT customer_id, customer_name, region, signup_date
    FROM customers_silver;

    Keys decide whether the star stays joinable over time. Prefer a stable natural key from the source, such as an order number, because it clusters and joins well. Use a surrogate key only when a source reuses or changes IDs. Even then, avoid hashes such as sha2(natural_key). A hash is deliberately random, so physically adjacent rows end up scattered across files, which hurts liquid clustering and Z-order performance. Instead, derive an order-preserving surrogate deterministically from the natural key, so it survives a full refresh. An IDENTITY column is only safe when the upstream table is append-only and never full-refreshed. A rebuild can give the same entity a new ID and silently break fact-to-dimension joins.

    Finally, primary and foreign keys on Databricks are informational and not enforced. Declaring them documents the star's relationships, but it won't stop a fact row from pointing at a missing dimension row.

    Checkpoint 4 of 5· Check yourself

    A source system sometimes reuses customer IDs, so you need a surrogate key for dim_customer. Which approach does Databricks recommend?

    Checkpoint 5 of 5· Check yourself

    Which gold-layer dataset type does Databricks recommend for a fact table such as fact_orders?

    Sources34

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Hashing the natural key with sha2() is the best way to create a surrogate key for a dimension.Why is that wrong?

      A hash is deliberately random, so adjacent rows scatter across files and liquid clustering and Z-order suffer. Use an order-preserving surrogate derived deterministically from the natural key.

      Covered in Building the gold-layer star schema

    2. 2.An IDENTITY column is always a safe surrogate key for a dimension.Why is that wrong?

      IDENTITY values are assigned at insert time. If the dimension is rebuilt or full-refreshed, the same entity can get a new ID and the fact-to-dimension joins break silently.

      Covered in Building the gold-layer star schema

    3. 3.Declaring a foreign key from a fact table to a dimension stops orphan fact rows from being written.Why is that wrong?

      Primary and foreign keys on Databricks are informational only. They document relationships but are not enforced.

      Covered in Building the gold-layer star schema

    4. 4.Data vault is the recommended model for the gold reporting layer.Why is that wrong?

      Databricks material places data-vault-like, write-performant models in silver. Gold uses de-normalized, read-optimized models such as star schemas.

      Covered in Data vault and normalized models in the silver layer

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “The terms bronze (raw), silver (validated), and gold (enriched) describe the quality of the data in each of these layers.”
      ↩︎ The medallion architecture as a map for data models
      “Following the medallion architecture is a recommended best practice but not a requirement.”
      ↩︎ The medallion architecture as a map for data models
      “some customers create multiple gold layers to meet different business needs, such as HR, finance, and IT.”
      ↩︎ The medallion architecture as a map for data models
      “It is common to start performing data modeling in the silver layer”
      ↩︎ Data vault and normalized models in the silver layer
      “Flatten schema or normalize data into multiple tables.”
      ↩︎ Data vault and normalized models in the silver layer
      “using a dimensional model by establishing relationships and defining measures”
      ↩︎ Checkpoint
    2. 2.
      “From a data modeling perspective, the Silver Layer has more 3rd-Normal Form like data models.”
      ↩︎ Data vault and normalized models in the silver layer
      “Data Vault-like, write-performant data models can be used in this layer.”
      ↩︎ Data vault and normalized models in the silver layer
      “The Gold layer is for reporting and uses more de-normalized and read-optimized data models with fewer joins.”
      ↩︎ Exam trap 4
      “Kimball style star schema-based data models or Inmon style Data marts fit in this Gold Layer”
      ↩︎ Checkpoint
    3. 3.
      “In Lakeflow pipelines, the star schema fits naturally at the gold layer of the medallion architecture.”
      ↩︎ Building the gold-layer star schema
      “Only reach for a surrogate key (a pipeline-generated stand-in identifier) when a source reuses or changes IDs.”
      ↩︎ Building the gold-layer star schema
      “Build a dim_date as a simple materialized view generated with sequence() and explode() over a date range”
      ↩︎ Building the gold-layer star schema
      “A hash is deliberately random, which is bad for liquid clustering and Z-order performance”
      ↩︎ Exam trap 1
      “a rebuild can reassign different IDs to the same entity and silently break the fact-to-dimension joins”
      ↩︎ Exam trap 2
      “A hash is deliberately random, which is bad for liquid clustering and Z-order performance”
      ↩︎ Checkpoint
      “Keep facts as streaming tables and dimensions as materialized views unless you specifically need change history”
      ↩︎ Checkpoint
    4. 4.
      “Primary and foreign keys are informational and not enforced.”
      ↩︎ Building the gold-layer star schema
      “Primary and foreign keys are informational and not enforced.”
      ↩︎ Exam trap 3

    Ready to test yourself?

    Practise Databricks Certified Data Analyst Associate in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.