SQL Server interview questions: - What is the difference between Fact Table and Dimensions?
Fact Table contains two things: -
- Foreign keys which pointing to primary key in dimension tables.
- Measures - This identifies some numbers in a business. Example Total number of sales, amount given, purchased amount etc.
Dimension tables contain denormalized data. Every record in this table will contain a unique identification key which will refer by Fact Tables.
Data warehouse design - It's all about creating dimensions and fact tables.
1) Dimensions are extracted from traditional database. Multiple tables in a traditional table are joined and considered as one
Example - Let say we have following database with use
Customer ( CustomerId, CustomerName, CustomerMobile, CItyId, GroupId)
Dimension table will look like this,
2) Fact table will be created containing only numbers and foreign keys pointing to other dimensions.
Now let say we have following dimensions
Now One Fact table look like
For technical trainings on various topics like WCF, MVC, Business Intelligence, Design Patterns, WPF, TFS and basic fundamentals feel free to contact SukeshMarla@Gmail.com or visit www.sukesh-marla.com
See the video explaining triggers, inserted and deleted tables in SQL Server.
Watch below latest interview questions and answers video on SQL Server :-