Bridge table for many-to-many relationship

404 views Asked by At

I'm confused about what the strucutre of the the bridge table.

star schema book is stucturing the bridge table with a group_key

example, if i have fact_orders ( order_sk , order_nk, amount, group_key) dim_sales_person ( sales_person_SK, sales_person_nk, name)

the bridge_table ==> orders_salesperson_bridge_table : ( group_key, sales_person_SK)

enter image description here

FROM any other source, ( google, youtube,..), the definition of the bridge table : Junction table in a database, also referred to as a Bridge table or Associative Table, bridges the tables together by referencing the primary keys of each data table.

strucutre : fact_orders ( order_sk , order_nk, amount) dim_sales_person ( sales_person_SK, sales_person_nk, name)

bridge table --> orders_salesperson_bridge_table : ( Order_id, sales_person_SK)

when should i choose each technique ? and why ?

thanks for any help,

1

There are 1 answers

0
NickW On

The SALES_GROUP table is there to allow you to allocate the value of a sale proportionately to multiple sales people. So in your example the sales amount of 1000 would be allocated as 750/250 between the 2 sales people