Code RoomSlowly changing dimensions
MediumPrep Room Coding #3546

Slowly changing dimensions

System designDistributed systemsMid–Senior~35 min

Design the dimensional model for an HR/payroll analytics warehouse where employee attributes change over time — salary, department, manager, level, and location all change, and analysts must answer historical questions like 'what was total comp by department as of last fiscal year-end' and 'how many people did manager X have on the day of the reorg.' Fact tables (timesheets, payroll runs) must join to the dimension state that was true at the event's date, not the current state. Design the dimension and fact schema and the join semantics.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.