The relationship is an important concept within logical models. Relationships are used to define the structure of your data. Relationships connect one entity to another. They show how information from one entity is used to access information in another entity.
A relationship can be defined as follows:
A relationship exists between two entities if it is possible to use data from the first entity to access data from the second entity.For example, a Customer entity contains all the information about a customer. The Order entity contains all the information about an order. An Order is placed by a Customer. There must be a link between the information in the Customer entity and the information in the Order entity. A relationship is used to establish this link.
In basic Chen E-R models, there are two types of relationships: Parent/Child Relationship and Join/From Relationship. Each relationship involves a different set of business rules and produces a different structure in terms of the final database.
Parent/Child Relationship
This type of relationship exists if the data in one entity is owned by another entity or one entity is contained within another entity. For example:
Order is an entity. Order Line is an entity.
Relationship: An Order may have one or more Order Lines. The Order Lines belong to a specific Order.
Join/From Relationship
This type of relationship exists if the data in one entity is used to access or "look up" data in another entity. For example:
Customer is an entity. Order is an entity.
Relationship: An Order refers to a Customer. The Customer places an Order.
The relationships not only define the structure of the data within the model, they actually affect the data or attributes within the model. The use of relationships, in combination with the attribute rule, ensure that our data is properly structured.