Sunday 21 October 2012

Bridge Table in Datawarehouse

What is a Bridge Table??


A bridge table sits between a fact table and a dimension table and is used to resolve many-to-many relationships between a fact and a dimension. Bridge table will contain only two dimension column ,key columns in both dimension .

Suppose there are two dimensions Customer and Region,
create table Customer(Customer_id int, Name varchar(110));
create table Region(Country_id int, Desc varchar(50));

Bridge table is created by joining the two tables Customer and Region using dimension keys
create table Brige_table_Custregion (Customer_id int, Country_id int)

Note: Also Bridge table is fact less with no measures.

3 comments:

  1. Can you please explain how many to many relationship exists between those two tables

    ReplyDelete
  2. Can we create bridge table to create the join b/w 2 facts tables by creating bridge table with key column from each fact table.

    ReplyDelete
  3. The first statement says Bridge table sits between fact and dimension table, but the example shows bridge table connected to 2 dimension tables.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...

ShareThis