Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Bridge Tables

2 posters

Go down

Bridge Tables Empty Bridge Tables

Post  juliang Tue Aug 13, 2013 10:28 am

I have a SalesDim table that holds 3 users - Underwriter, SalesPerson and AdminSupportPerson (Fig.1)

Should these 3 users exist in the SalesDim table as foreign keys to UserKey in the UserDim (Fig.2) or should I build a bridge table SalesUserBridge (Fig.3) to hold the 3 users that sits between the Sales and User dimensions? Both would work I'm looking for best practice, I understand that when you have a one to may relationship between a fact table and dimension you should use a bridge table. Does this have benefits when you cube the data?

Regards,
Julian

Fig.1

SalesDimTable

SalesKey
UnderwiterKey (FK)
SalesPersonKey (FK)
AdminSupportPersonKey (FK)

Fig.2

UserDimTable

UserKey (PK)

Fig.3

SalesUserBridgeTable

SalesKey (FK)
UserKey (FK)
UserType (Underwriter,SalesPerson,AdminSupportPerson)


juliang

Posts : 4
Join date : 2013-08-13

Back to top Go down

Bridge Tables Empty Re: Bridge Tables

Post  ngalemmo Tue Aug 13, 2013 3:08 pm

Three keys, one for each role is the better approach. Bridges should only be used to resolve M:M relationships.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

Bridge Tables Empty Re: Bridge Tables

Post  juliang Wed Aug 14, 2013 5:58 am

Thank you

juliang

Posts : 4
Join date : 2013-08-13

Back to top Go down

Bridge Tables Empty Re: Bridge Tables

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum