HomeInterview QuestionsAt the table level, can you explain the difference…

At the table level, can you explain the difference between fact and dimension tables, how you define relationships between them, and what a primary key is? Also, how do you handle surrogate keys?

1Times asked
Sep 2026Last seen
Sep 2026First seen

💡 Model Answer

In dimensional modeling, fact tables store measurable, quantitative data and typically have surrogate keys. Dimension tables hold descriptive attributes and are linked to fact tables via foreign keys. The relationship is usually many‑to‑one from fact to dimension. A primary key uniquely identifies each row in a table; in dimensions it is often a surrogate key (an artificial integer) to avoid changes when natural keys change. Surrogate keys are generated during the ETL process and provide stability for slowly changing dimensions. When designing relationships, you enforce referential integrity by ensuring every foreign key in the fact table matches a primary key in the dimension table. This structure allows efficient joins and aggregations in analytical queries.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500