Can someone explain concept of ontomany, manytoone and manytomany when we need to use? In which situation?

  Kiến thức lập trình

Can someone explain concept of ontomany, manytoone and manytomany when we need to use? In which situation? if we take an example like there is a Student, Exam and subjects class and below are the fields which we need to use, How we will create our model?

Each Student has the following fields:
Student Registration ID (Unique Identifier)
Student Name
List of enrolled Subjects
List of registered Exams
Each Subject has the following fields:
Subject ID (Unique Identifier)
Subject Name
List of registered Students
Each Exam has the following fields:
Exam ID (Unique Identifier)
Subject
List of enrolled Students

Want to understand the concept of manytomany, ontomany and manytoone.

LEAVE A COMMENT