Forum Discussion

Mkrishna's avatar
Mkrishna
Helper III
2 years ago

Bridge Table Not working as expected

Hi All,

 

Thank you for reading my post.

 

I have a Sales data set. I have following tables

1. Main table: This is the Fact Table. This contains Sales data for all the store from Jan to August. The column here are store number, store name, product, brands, Sales Rep, Manager, date of visit.

2. Store List: This table contains list of stores according to the month i.e. store has date stamp on it.  Currenlty I just have 2 month for July and August. Some store can be visited both in July and August. Some in only July or August. 
Date: The Date table which I made.
Bridge Table : As the relationship between the Store List and Main Table is many to many, I created a list of store from Store List(removed the date column)  Removed the duplicates. So this Bridge table will only have store lists.
Previous Date Table: This is also a Date table. As I my requirement is to go back 3 months from the selected date, I created a Previous Date Table as well.
Products: This table contains all the products from Main Table
Brands: This table contains all the brands from Main Table.


Data Modeling:

The picture below shows that Data Model I have developed. The link between Previous Data and Date is inactive. Other than this all is active relationship.

 

 

 

To overcome the Many to Many relationship between the Store List and Main Table, I created a Bridge Table.


My Problem,

I have never used Bridge table in my data yet and this will the first time I am using Bridge table.

During Table Visualization when I put the list of store from Bridge Table and store list from Main Table, all is well. But when I put the store number from Store List, I get error which is shown below. I even tried with making relationbetween Date and Main table inactive and I am still getting the same error.


Please do help 

1 Reply

  • I have never used Bridge table in my data yet and this will the first time I am using Bridge table.
    

    Or maybe not.  Bridge tables are usually a sign of a sub-optimal data model. Ideally you have dimension tables controlling the fact tables. Not the other way round.  Connecting fact tables directly or via bridge tables should be avoided.