Relation Between Entities:
Database approach allows us to define relationship between entities. Natural relationships between entities are of one of the following types:
a. One to one
b. One to many
c. Many to many
An example of one to one relationship is that of between husband and wife where the husband has only one wife and the wife has only one husband.
Another example could be the relationship between the salesman and the territory, where each salesman has been assigned one territory and each territory has been assigned to one salesman.
| Husband |
Employee |
| ↓ |
↓ |
| Wife |
I.D card # |
| |
|
One to many relationship exist between the country and state and its district. A state may have many districts but a district belongs to one and only one state. One to many relationships are between the father and his children, between the department and its section etc
| Father |
Employee |
| ↓ |
↓ |
| Children |
Skills |
| |
|
Many to many relationship exist between the teachers and students of a college, where a teacher teach many students and a student attends the classes of many teachers.
| Teacher |
Children |
| ↓ |
↓ |
| Student |
Toyes |
| |
|
|