Managing Many-To-Many Relationships

As mentioned earlier (See article on Identifying Table Relationships), RDBMSs do not
support manytomany relationships bet!een tables" This is the e#ample !e had of
this type of relationship$
Tables with a many-to-many relationship
The usual solution is to brea% this relationship do!n into t!o onetomany
relationships by creating an intersection or junction table" This table !ould hold the
primary %ey field from each of the tables in the manytomany relationship" In the
ne! table, those fields together !ould be a multifield primary %ey resulting in the
follo!ing relationships and diagram"
An intersection table and two one-to-many relationships
This forms t!o onetomany relationships& each employee can !or% on many
pro'ects and many employees can !or% on a single pro'ect" (ust as you might ha)e
to ma%e a connection in *hicago to fly from Boston to Seattle, you sometimes need
an intermediate or 'unction table to get !here you need to be"

Sign up to vote on this title
UsefulNot useful