Entity Relationship Model
Student
Courses
One to One Mapping
Student
Studentdetails
For every row on the left-hand side, there will be only one matching entry on the right-hand side.
For student id 101, you will find one SSN and one DOB.
One to Many Mapping
Student
Address
What do you notice here?
Every row on the left-hand side has one or more rows on the right-hand side.
For student id 101, you will notice the home address and Dorm address.\
Many to Many Mapping
Student
Student Courses
Courses
What do you notice here?
Students can take more than one course, and courses can have more than one student.
Last updated