Link to home
Start Free TrialLog in
Avatar of lankapala
lankapala

asked on

Fact and Dimension Table issue

Hi,
 Please find attached Image.
My query
I have Created Data warehouse. For example
Dimension Table : DimSite, DimCustomer,DimSalesperson
FactTable : FactinvoiceDetails

DimSite is Include

SiteID    Sitename

1            United Kigdom
2           USA
3           France

DimCustomer
SiteID       CustomerID CustomerName
1                R001             Ryan
2                R001             Bryan
3                R001            Stephen

DimSalesperson
SiteID       SalespersonID      SalespersonName
1                S001                       Mark
2                S001                       Stacy
3                S001                       Franck


My question is

I have to connect DimCustomer and DimSalesPerson to DimSite Table also
FactTables.png
Avatar of ste5an
ste5an
Flag of Germany image

I have to connect DimCustomer and DimSalesPerson to DimSite Table also.
No. Cause you solve this in the ETL process. The fact table stores this relationship.
Avatar of lankapala
lankapala

ASKER

Ok so no needed connect each dimensions table with dimsite ID , only connected with facttable is enough?
It requires a little bit of analysis. Does your fact depend on the site, where items are sold? Then it belongs to the fact table. I assumed from your image, that this is the actual situation. Cause Site seems to be its own dimension.

Otherwise, you stuff everything which is plain dimensional into the dimension tables. So, when the site does not belong to the fact table, then you embed the site information into the dimension tables. This means no lookup tables. In dimensional modelling, this kind of denormalization is the way to go. Important thing is, that you name all columns with the site information identical in the other dimensional tables.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.