The following examples show one-to-one, one-to-many, and many-to-many relationships.
In a one-to-one relationship, each instance of one entity is related to one, and only one, instance of another entity.
For example, to facilitate quick service, each salesperson in the company is assigned to one territory. Customers in a territory are serviced by the salesperson assigned to that territory.
The relationship between the two entities Salesperson and Territory is a one-to-one relationship because each salesperson is assigned to one territory and each territory has one, and only one, salesperson assigned to it.
The following ERD shows this one-to-one relationship.

The following instance diagram shows a one-to-one relationship.

In a one-to-many relationship, one instance of an entity is connected with several different instances of another entity.
For example, a customer places more than one order with the company; an order is placed by a customer. The relationship between the Customer entity and Order entity is a one-to-many relationship because a customer can place more than one order with the company; however, an order can be associated with one, and only one, customer.
The following ERD shows a one-to-many relationship.

The following instance diagram shows a one-to-many relationship.

In a many-to-many relationship, an instance of one entity is related to more than one instance of the other entity at a time and vice versa.
For example, the relationship between the Order entity and Product entity is a many-to-many relationship because:
The following ERD shows a many-to-many relationship.

The following
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |