A Binary relationship is when there is relation between two entities.This relationship is further divided into three types.
- One to One
- One to Many
- Many to one
- Many to Many
1.One to One: In this relationship, one entity can be associated with just one entity.
For Example:
A student enrolls only for one course and a course will also have only one Student. We rarely found this scenario in real world.
2. One to Many:In this relationship, one entity can be associated with many entities.
For Example:
A Subject can avail many courses and Each courses belongs to one Student.
3. Many to one:In this relationship, many entities can be associated with just one entity.
For Example:Student enrolls for only one Course but a Course can have many Students.
4. Many to Many:In this relationship, many entities can be associated with many entities.
For Examplemany students can enroll for more than one courses.
0 Comment(s)