#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Interview Insights · Data Engineer

Why Every Data Engineer Should Practice Explaining Their Model Aloud

For a data engineer, 'model' usually means the data model: the facts, dimensions and keys that every report depends on. If you cannot state its grain in one sentence, the rest of the explanation will wobble.

Tracks
Explaining a Data Model · Live Interactive
Grain
—
One row means...
History
—
When a customer moves
Trade-off
—
Why this shape
Grain→Facts→Dimensions→History
Click a candidate type to see how the same star schema sounds when it is explained with and without a clear grain statement.

Home / Tutorials / Career Guides / Why Every Data Engineer Should Practice Explaining Their Model Aloud

Interview Insights · Data Engineer

Why Every Data Engineer Should Practice Explaining Their Model Aloud

STEP 1STEP 2STEP 3STEP 4GrainOne row perorder lineDefineMeasuresQuantity, priceDiscount, taxFactsDimensionsDate, productCustomer, storeContextHistorySCD Type 2 oncustomer cityChange
Explain a model in this order: the grain of the fact table, the measures on it, the dimensions around it, and how history is kept.

Quick summary — DE data model

When I ask a data engineer about their model, the first sentence I want is the grain: what exactly does one row in the fact table represent? In this article, 'model' means the data model rather than a machine learning model. Many candidates can draw a star schema but cannot say what one row means, how history is kept when a customer changes city, or why they chose a star over a normalised design. These are spoken skills. Practising them aloud gives you a short, confident explanation and calm answers to the follow-ups.

In this guide you will learn:

  1. How to state the grain of a fact table in one sentence
  2. How to explain a star schema without hiding behind jargon
  3. What to say about SCD Type 2, with working SQL
  4. How to defend modelling trade-offs such as star versus normalised
  5. A rehearsal worksheet for the model in your own project

SECTION 01Start with the grain: what does one row mean?

The grain is the most important sentence in any data model explanation. 'One row per order line' and 'one row per order' sound similar, but they produce very different totals. If a candidate cannot tell me the grain, I usually find a double-counting bug in their model within a few questions.

Practise saying the grain before anything else. Then list the measures, which must all make sense at that grain, and then the dimensions that give each row its context. That order is easy to follow when spoken, and it shows you designed the model rather than inherited it.

Fact tableGrain statementTypical measuresCommon mistake
fact_order_lineOne row per product line in an orderQuantity, unit price, discountPutting order-level shipping fee on every line
fact_daily_inventoryOne row per product per store per dayUnits on hand, units reservedSumming on-hand stock across days
fact_page_viewOne row per page view eventView count of 1, time on pageMixing sessions and views in one table
fact_paymentOne row per payment attemptAmount, success flagTreating failed attempts as revenue
CREATE TABLE dim_date (
    date_key      INT PRIMARY KEY,      -- e.g. 20240305
    full_date     DATE NOT NULL,
    month_name    VARCHAR(10),
    is_weekend    BOOLEAN
);

CREATE TABLE dim_product (
    product_key   INT PRIMARY KEY,
    product_id    VARCHAR(20) NOT NULL,  -- natural key from source
    category      VARCHAR(50),
    brand         VARCHAR(50)
);

CREATE TABLE fact_order_line (
    order_id      VARCHAR(20) NOT NULL,
    line_number   INT NOT NULL,
    date_key      INT NOT NULL REFERENCES dim_date(date_key),
    product_key   INT NOT NULL REFERENCES dim_product(product_key),
    customer_key  INT NOT NULL,
    quantity      INT NOT NULL,
    unit_price    NUMERIC(10,2) NOT NULL,
    discount      NUMERIC(10,2) DEFAULT 0,
    PRIMARY KEY (order_id, line_number)
);
star_schema.sql

The shipping fee detail is the kind of thing that convinces me you thought about the grain. It shows you checked every measure against the definition of a row, instead of putting every column you had into one table.

Key insight: A measure that does not belong at the grain is the most common source of wrong totals. When you explain your model aloud, say how you checked each measure against the grain.

SECTION 02Explaining history: slowly changing dimensions without jargon

My favourite follow-up is simple: 'A customer moves from Delhi to Pune. What happens to last year's sales by city?' If you overwrite the city, last year's Delhi sales suddenly appear under Pune. Sometimes that is what the business wants. Often it is not.

You may know the names SCD Type 1 and Type 2, but in the interview, explain them as behaviour first and give the name second. 'We keep the old row, close it with an end date and add a new row for Pune' is clearer than 'we use SCD2'. Then be ready to show the SQL.

ApproachWhat happens on changeEffect on old reportsWhen to use
Type 1 (overwrite)Old value replacedHistory shows the new valueCorrections such as a fixed spelling
Type 2 (new row)Old row closed, new row addedHistory keeps the old valueCity, segment, plan: anything analysed over time
Type 3 (extra column)Previous value stored in a columnOnly one prior value keptRare; a single known reorganisation
Snapshot tableFull copy taken each dayAny date can be reproducedSmall dimensions or audit needs
-- dim_customer: customer_key (identity), customer_id, city, segment,
--               valid_from, valid_to, is_current
-- PostgreSQL syntax

-- Step 1: close current rows whose tracked columns changed
UPDATE dim_customer AS d
SET valid_to = CURRENT_DATE - 1,
    is_current = FALSE
FROM stg_customer AS s
WHERE d.customer_id = s.customer_id
  AND d.is_current = TRUE
  AND (d.city IS DISTINCT FROM s.city
       OR d.segment IS DISTINCT FROM s.segment);

-- Step 2: insert a current row for new and changed customers
INSERT INTO dim_customer (customer_id, city, segment,
                          valid_from, valid_to, is_current)
SELECT s.customer_id, s.city, s.segment,
       CURRENT_DATE, DATE '9999-12-31', TRUE
FROM stg_customer AS s
LEFT JOIN dim_customer AS d
       ON d.customer_id = s.customer_id
      AND d.is_current = TRUE
WHERE d.customer_id IS NULL;
scd_type2.sql

The last spoken sentence is the one most candidates miss. SCD Type 2 only preserves history if the fact table stores the surrogate key of the version that was current at the time of the sale. If facts store the natural customer_id, the history in the dimension is never used.

Remember: Explain behaviour first, label second. 'Old row closed, new row added, facts point to the version' is the whole idea. 'Type 2' is just its name.

SECTION 03Defending your modelling choices when challenged

Once your model is on the table, I will push on its shape. Why a star and not third normal form? Why surrogate keys? Why is this table partitioned by date? A candidate who answers 'that is the standard way' has not finished the thought. Every choice has a reason and a cost, and saying both aloud is what makes it a decision.

The goal is not to be right about everything. It is to show that you know what you gave up. A star schema trades some storage and update complexity for simpler, faster analytical queries. Say that sentence and you have answered the question.

ChoiceWhat you gainWhat you give upShort spoken line
Star schemaSimple joins, fast BI queriesSome duplicated attributesAnalysts query it daily, so simple joins win
Surrogate keysStable keys, supports SCD2Extra lookup during loadsSource IDs change; our keys must not
Partition by dateFast date filters, cheap reloadsSmall files if overdoneMost queries filter on a recent date range
Wide denormalised tableEasiest for dashboardsHard to keep consistentBuilt on top of the star, not instead of it
-- Monthly revenue by category and customer city,
-- using the city that was true at the time of each sale
SELECT d.month_name,
       p.category,
       c.city,
       SUM(f.quantity * f.unit_price - f.discount) AS net_revenue
FROM fact_order_line AS f
JOIN dim_date     AS d ON d.date_key     = f.date_key
JOIN dim_product  AS p ON p.product_key  = f.product_key
JOIN dim_customer AS c ON c.customer_key = f.customer_key
WHERE d.full_date >= DATE '2024-01-01'
GROUP BY d.month_name, p.category, c.city
ORDER BY d.month_name, net_revenue DESC;
model_tradeoffs.sql

Notice that the revenue query reads like the business question. That is the strongest argument for your model, and running a query like this during your explanation, even on paper, makes the design concrete.

Pro move: Bring one real query your model makes easy. Showing how the business question maps to a few joins is more convincing than any definition of a star schema.
How Uncodemy helps: This is exactly what we drill at Uncodemy. Students in our Data Science Training Course rehearse Data Engineer interview answers with trainers in one-to-one mock interviews, so the real interview feels like the fifth time, not the first.

SECTION 04Worksheet: rehearse your data model explanation

Use this for the main model in your project or portfolio. Fill it in writing, then explain it aloud in under three minutes and record yourself.

MY DATA MODEL

Business process modelled: _______________________
Fact table name: ________________________________
Grain (one row = ...): ___________________________
Measures (each checked against grain): ___________
Dimensions: _____________________________________
Which dimension keeps history, and how: __________
Partitioning or clustering choice: _______________
One query this model makes easy: ________________
model-worksheet.md

SECTION 05Habits that make your model explanation clear

Data models are visual, but interviews are often spoken or done over a call. These habits help you explain structure without a perfect diagram.

  • Say the grain twice — State it at the start and repeat it when you reach the measures. Repetition helps the listener keep the model in their head.
  • Use one example row — Describe a single row, such as 'order 1045, line 2, two units of a phone case', to make the grain concrete.
  • Name the late-arriving case — Mentioning how you handle a fact whose customer is not loaded yet, for example with an 'unknown' row, shows real loading experience.
  • Keep the diagram small — Draw one fact and three or four dimensions. Extra tables can be mentioned in words.
  • Link the model to a question — Every table should exist because someone asks a question that needs it. Say which question.
Pro tip: Before the interview, write your grain statement on a sticky note and say it aloud ten times. It sounds simple, but it is the sentence candidates most often fumble under pressure.

SECTION 06Interview Q&A — DE data model

Q1What is the grain of a fact table?

The grain is the exact meaning of one row, such as one order line, one payment attempt or one product per store per day. Every measure in the table must make sense at that level, and choosing the grain is the first step in designing a fact table.

Q2Explain the difference between SCD Type 1 and Type 2.

Type 1 overwrites the old attribute value, so history shows the latest value. Type 2 closes the old row with an end date and inserts a new row with the new value, so reports for past dates still show what was true then. Facts must store the surrogate key for Type 2 to work.

Q3Why use surrogate keys in a data warehouse?

Surrogate keys are keys created by the warehouse. They stay stable even if source IDs change or two sources reuse the same ID, and they allow several versions of the same customer to exist for SCD Type 2. The cost is a key lookup during fact loading.

Q4When would you choose a star schema over a normalised model?

For analytical workloads, where people mostly read and aggregate data. A star schema keeps queries to a fact table and a few dimension joins, which is faster and easier to write. Normalised models suit transactional systems where many small writes must stay consistent.

Q5How do you handle a fact that arrives before its dimension row?

A common approach is to point the fact to a placeholder or 'unknown' dimension row, or to create an inferred dimension row with just the natural key. When the full dimension data arrives, the inferred row is updated. The key is not to drop the fact.

SECTION 07Test yourself — DE data model quiz

Five questions. No sign-up.

0 / 5

Pick an answer to see why it is right or wrong.

SECTION 08Frequently asked questions

What data modelling questions are asked in data engineer interviews?

Common questions cover fact and dimension tables, grain, star versus snowflake schemas, slowly changing dimensions, surrogate keys, late-arriving data and how you would model a specific business process such as orders or subscriptions.

What is the difference between a star schema and a snowflake schema?

In a star schema, each dimension is a single denormalised table joined directly to the fact. In a snowflake schema, dimensions are split into further related tables, such as product linked to a separate category table. Stars are simpler to query; snowflakes reduce some redundancy.

How do I explain my data model in an interview?

State the grain first, then list the measures and check each one against the grain, then describe the dimensions, then explain how history is handled. Finish with one real query the model makes easy.

Is SCD Type 2 asked to freshers?

It is commonly asked in data engineering and warehouse roles, including for freshers. You should be able to explain it in plain words and write or describe the SQL that closes old rows and inserts new ones.

What is a surrogate key in simple words?

It is an ID created inside the data warehouse, usually a number, used instead of the ID from the source system. It stays stable and allows several historical versions of the same record.

How can I prepare for Data Engineer interview answers with a trainer?

Yes. Uncodemy's Data Science Training Course in Noida (classroom and online) includes live projects, one-to-one mock interviews and resume reviews, so you practise Data Engineer interview answers with trainer feedback before the real interview. You can book a free demo class from this page to see how the sessions work.

Classroom & online · Noida

Design data models you can defend

Our Data Science Training Course covers SQL, warehousing, dimensional modelling and pipelines, with spoken reviews where you explain your model out loud before interviews.

Talk to a counsellor for current fees
  • Star schema projects
  • SCD and history handling
  • Advanced SQL practice
  • Spoken model reviews