Jump to content

I need a step by step on creating a many to many realation!


This topic is 6044 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am having problems in understanding it ive tried many guides but i still dont understand it.

Maybe if someone explain me with their own words.

Posted

You resolve many-to-many relationships with a join table.

For example, Students and Courses. Each course can have many students. Each Student can take many courses.

So, create a third table, Enrollment, that stores the combinations of a student and a course. If Sue takes 5 courses, there will be 5 records in the Enrollment table with her StudentID. Each of these records would have a different CourseID.

Student Record

ID Name

100 Sue

Course Record

ID Name

4000 Biology

Enrollment Record

EnrollmentID StudentID CourseID

1000 100 4000

This is Sue's Enrollment for Biology.

This topic is 6044 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.