Relationship Among Entities
Relationship Among Entities:-
There are three types of relationship between entities.
- One-to-one (1:1) relationship:-
It occurs when an instance of entity A is associated with an instance of entity B.
For example: – Employees have their own separate office in an office. There is a unique office for each employee and a unique employee for each office.
- One-to-many(1:N):- Relationship occurs when one instance of entity A is associated with multiple instances of entity B.
For example:- An Employee works in a department; A department can have many employees.
Many-to-many(M:N):- Relationship occurs when many instances of entity A are associated with many instances of entity B.
For example: – Many employees can work in many projects.