Bridge Tables

View previous topic View next topic Go down

Bridge Tables

Post  juliang on 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

View user profile

Back to top Go down

Re: Bridge Tables

Post  ngalemmo on 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.
avatar
ngalemmo

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

View user profile http://aginity.com

Back to top Go down

Re: Bridge Tables

Post  juliang on Wed Aug 14, 2013 5:58 am

Thank you

juliang

Posts : 4
Join date : 2013-08-13

View user profile

Back to top Go down

Re: Bridge Tables

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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