Skip to content
RED SAGSkills
easyData Engineer interview question

Explain a star schema and why it is used in data warehouses.

What the interviewer wants to hear

  • Central fact table with measures and foreign keys
  • Surrounding dimension tables with descriptive attributes
  • Grain of the fact table must be clear
  • Simple joins and fast aggregations for BI

Model answer

A star schema has one central fact table connected to several dimension tables, which looks like a star. The fact table stores events at a defined grain, for example one row per order line, with numeric measures like quantity and amount, plus foreign keys to dimensions. Dimension tables, such as customer, product, store and date, hold descriptive attributes used for filtering and grouping. Dimensions are usually denormalised, so product category and brand sit in the same table instead of separate lookup tables. It is popular because it is easy for analysts to understand, queries need only simple joins from fact to dimensions, and BI tools work well with it. The most important design step is choosing the grain of the fact table, because mixing grains causes double counting.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Data Engineer questions