Building Strong Relationships Page 2

A many to many relationship exists with items such as orders to products, professors to courses, students to courses. Each student can take many courses, and each course can have many students.

These types of relationships are resolved by an associative entity, also known as a cross-reference table or intersection table.

The following model will show how to resolve Orders to products.

As you can see, the proper way to handle a many to many relationship, assuming a logical model in 3NF, is to break the relationship down into a series of one to many relationships.

The following example shows Customers to Products.

Customers may have many orders, but each order belongs to one customer. Orders are required to have one or more order details, and each order detail may belong to only one order. Each order detail may have only one Product, and products may appear on zero, one, or many order details.

This article was originally published on Mar 1, 2001
Page 2 of 2

Thanks for your registration, follow us on our social networks to keep up-to-date