Vous êtes sur la page 1sur 1

A bridge table allows you to resolve many-to-many data relationships.

For example, you might have an Employees table and a Jobs table. An employee within an organization can have many jobs such as clerk, first-aid responder, and floor leader. Additionally, one job might be occupied by more than one employee such as there are 10 floor leaders in the organization. There is a many-to-many relationship between Employees and Jobs. However, a single table contains all the employees and another single table contains all the jobs within the organization. To record and resolve this many to many relationship, you create a bridge (intermediate) table called Assignment. As a result, one employee may have many assignments and one job may also have many assignments. This assignments table records employee and job combination. The primary key is the combination of employee and job, and results in a unique record called an assignment. Therefore, Employee to Assignment is a 1:n relationship and Job to Assignment is also a 1:n relationship. The Assignment table acts as a bridging table between the Job and Employee tables, allowing the many to many relationship between Employees and Jobs to be resolved.

Vous aimerez peut-être aussi