Do you know about fact tables and dimension tables? Can you please explain the difference between them?
💡 Model Answer
In a data warehouse, a fact table stores quantitative data (measures) about business events, while dimension tables provide descriptive context for those facts. A fact table typically contains foreign keys that reference primary keys in dimension tables, and it may also include aggregated metrics such as sales amount, quantity sold, or profit. Dimension tables hold attributes that describe the dimensions of analysis, like product name, customer demographics, time periods, or geographic locations. For example, a sales fact table might record each transaction with keys to a product dimension, a customer dimension, and a date dimension. The product dimension would include attributes like product name, category, and price. Fact tables are usually large and highly normalized, whereas dimension tables are often denormalized to support fast querying. The key difference is that facts are numeric measures that can be aggregated, while dimensions provide the context needed to slice and dice those measures.
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