1-Dimensions are extracted from traditional database. Multiple tables in a traditional table are joined and considered as one
dimension table.
Example - Let say we have following database with use:- Customer ( CustomerId, CustomerName, CustomerMobile, CItyId, GroupId),City (CityId,CityName),Group(GroupId, GroupName)
Dimension table will look like this,
CustomerDimension(CustomerId,CustomerName,CustomerMobile,CityName,GroupName)
2-Fact table will be created containing only numbers and foreign keys pointing to other dimensions.
Now let say we have following dimensions,CustomerDimension (CustomerId,CustomerName,CustomerMobile,CityName,GroupName)
TimeDimension(Timekey,Year,Month,Day)
ProductDimension(ProductId,ProdudctName,ProductPrice, ....)
Now One Fact table look like
ProductSale(ProductId,CustomerId,TimeKey,QtySold)