GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  Basics
Go To First  |  Previous Question  |  
 Basics  |  Question 113 of 113    Print  
Bridge Table
What is the use of bridge table. Can give a simple example?


  
Total Answers and Comments: 4 Last Update: October 19, 2009     Asked by: sharuvijay 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: siva.3aug
 
Bridge table is also known as helper table or reference table.
If there is a many to many relationship between fact table and dimension table then we use bridge table to resolve this relationship (this bridge table is anology to associative entity between two entities having many to many relation ships).
Bridge table is also used to flatten out the hierarchy in the dimension table.
Thanks
Siva

Above answer was rated as good by the following members:
aroravikas, vying
February 08, 2009 19:36:20   #1  
siva.3aug Member Since: February 2009   Contribution: 1    

RE: Bridge Table
Bridge table is also known as helper table or reference table.
If there is a many to many relationship between fact table and dimension table then we use bridge table to resolve this relationship (this bridge table is anology to associative entity between two entities having many to many relation ships).

Bridge table is also used to flatten out the hierarchy in the dimension table.

Thanks
Siva

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 14, 2009 02:22:08   #2  
Sirini Member Since: June 2009   Contribution: 3    

RE: Bridge Table
An example of a Bridge table would be relationship table between student_master and courses_master. A Student may participate in multiple courses and obviously in a course there will be multiple students. In this scenario to maintain relationships between student_master and courses_master we need another table which may be called Student_courses. This table will have all relationships between Students and Courses.A bridge table is a table that only contains the keys between the two tables in a many-to-many relationship. These tables typically consist of mostly key fields the primary keys of the two tables needing the many to many relationships. Sometimes there are more data elements but often there are only two columns both foreign keys.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
October 07, 2009 08:11:44   #3  
tisha24 Member Since: September 2008   Contribution: 10    

RE: Bridge Table
A table which maintained to define the relationship between two different tables is known as bridge tables.
For example say there are two tables one table with employee information (an employee table) and other with deparment details.
Now a bridge table coming to picture to maintain the relationship between an employee with his/her department. which contains informations like which employee belongs to which department.

Here is a example to understand More precisely

Employee table
--------------------
EMP_CD EMP_name DOJ
1001 MR.X 12-06-2006
1002 Ms.Y 24-11-2004
1003 MS.K 25-02-2004

Department table
-----------------------
DEPT_CD DEPT_NAME SECTOR_CD MANAGER_NM
IT_DEV S/W Developer SDV MR.XL
MNGNT HR Management HRD MS.DS

EMP_DEPT (Bridge Table)
---------------------------------
EMP_CD DEPT_CD
1001 MNGNT
1002 IT_DEV
1003 IT_DEV

 
Is this answer useful? Yes | No
October 19, 2009 07:25:06   #4  
vijsarav11 Member Since: October 2009   Contribution: 1    

RE: Bridge Table
Hi all... This is my view on bridge tables:

Bridge table in simple can be called as reference tables. As the name indicates this table can be used to link two tables with 1 reference id.

It can be explained in detailed with the below example.

Say 2 customer have taken two mortgage loans in a bank in such a way that in one loan with 2 borrowers and another with only one.
In order to link Customers with the Account the table structure can be designed as:

Accounts - Table:
----------------------
AccountId Account_Open_Date
10123 05-02-1975
14535 06-08-2000

Customer - Table:
-----------------------
CustomerId Customer_Name Customer_Status
25366 Jon Burvill Primary
25367 Mariola Secondary

Customer Bridge Table:
------------------------------
Customer_Bridge_Id Account_Id Customer_Id
7894654 10123 25366
7894655 10123 25367
9656456 14535 25366

When Customer & Customer Bridge Id are called then the data with account details will be retreived.

Regards
Viji


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape