I'll keep it nice and short and simply link to the ERD:


Users can be assigned a role, one of those is student. So for the sake of this, Students are the same as Users!

A Student can be enrolled in many OfferedUnits. A Student can also be in Many Teams and a Team can have Many Students.

The issue I am having is this: Should the Many-to-Many relationship that allows a Student to be in many teams and a Team to have many students be between the Users Table and the Teams Table or the Enrollment Table and the Teams table?

The argument for the Enrollment option is as such: You will only be able to assign a Team to Enrolled students. That's the only reason I can think of doing it that way.

Otherwise, it logically doesn't make sense to connect Enrollment to Teams, because it's the STUDENT who is in a Team, not their Enrollment.

What do you think?


1 Answer 1


I would have assumed that one team can have many users and one user can be part of many teams thus creating a new junction table, Users_Team. From there I would have related users to Enrollment or user_team to enrollments depending on business logic. Am I right in assuming that enrollment will contain recrods such as Maths, Science, Art etc...?

Does it make sense for a user to be enrolled in maths as a individual, and also as a team?

From my understanding, I would drop that TeamMembers table.

  • The TeamMembers table is that weak entity required for the Many-to-Many relationship b/w Users and Team. Meaning a user can be in many teams! It's the Users_Team table you want, but with a different name haha. Mar 22, 2016 at 9:34
  • Teams do not enrol in units, only users/students do. And YES, enrollments will have units in them such as maths, arts etc. Mar 22, 2016 at 9:35
  • @AndrewSalib I didn't look at units, only users, enrollments, and teams. Ok I see now, after understanding the notation better that there can not be a many to many between users and teams, i.e you are not interested in listing all users in a team only the supervisor. If you wanted to list all users in a team I would move team members to between users and teams. Should there not be a junction table between users and enrollments, with that table then relating to offeredUnits and attendance.
    – Pixelated
    Mar 22, 2016 at 10:18
  • If you're talking about the naming, then don't worry about that, that will be fixed. Mar 22, 2016 at 10:44
  • I am talking about the USER_TEAM Table should it be b/w Enrollment and Team or User and Team directly? Mar 22, 2016 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.