Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kawadeprasad
Starting Member
13 Posts |
Posted - 2012-05-11 : 01:39:21
|
| Hi All,What are lookup table and physical lookup is different from lookup table ?Please can you define Fact and Dimention table?I have read lot definitions on forums but can some please explain in easy and understandable language with an example.Thanks!!! |
|
|
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2012-05-11 : 06:24:26
|
| [code]Fact Table : Fact table always have foreign keys and measured values .dimension table : Dimension table contains the data of particular entityFor Example.we have 4 dimension tables like below customerProduct TimesalesThese four tables contain the information specific information only likeCustomer Table have all information of customer.Product has info of all productTime table contains data of time like year,quater,month,day and so on...Sales has sales specific info.Now if a business has requirement where they want to know that how many products were sold out in particular year or month or day by particular customer . In that case fact table comes in picture where it maintains the data on particular fact or we can say it stores the factual data.. As I mention that it has all foreign keys of all required dimensions table and also a quantity or measured column which stores numeric data.So the schema of Fact table would beProductSalesFact( surrogateKey uniqueidentifier,CustId nvarchar(max),ProdcuctId nvarchar(500),Salesid nvarchar(500),quantity int)..Above mentioned schema is only for example to understand the fact table [/code] |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2012-05-11 : 11:02:04
|
| If you are talking SQL server, it's a trick queston. There are no such things as Facts and Dimensions in a relational database. :) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-11 : 15:37:07
|
| Facts and Dimensions come in dimensional modelling. Facts represent measures which you want analyse and Dimensions represents entities based on which you do analysis. So sales,qty,count etc come under facts and customer,time,order,product,vendor etc come under dimensions generally. There can also be factless facts which are special attributes which can be used for analysis like flag fields.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|