0

In the below ER diagram:

  • A manager can have many Users but a User can only have 1 Manager
  • A Manager must be able to assign multiple users to multiple courses

Are the manager relationships correct?

enter image description here

3
  • Are you certain you don't need to add a layer for course session? i.e. separate course description from course schedule?
    – Ray
    Commented Jul 23, 2019 at 16:41
  • Thanks @Ray. Would the Course_Assigned table do that job? As it is online courses this would include assigned_start_date and assigned_end_date - i.e. the start date of course depends on when the manager has assigned the course
    – MKenn
    Commented Jul 24, 2019 at 7:53
  • It certainly could. As John said below you would need to add session related columns (SessionId, Schedule info, etc.) Basically it would become a many-2-many mapping table. A course could have multiple sessions and a session would have multiple students.
    – Ray
    Commented Jul 25, 2019 at 23:49

1 Answer 1

1

One issue with this design is allowing for a user to have more than one course at a time. A way to work this is to have a join table between the User table and the Courses table, with only three columns: Join_id, Course_id, User_id. The relationship between users and managers looks good to me, with many users being assigned only one manager each. Regarding one of the comments; adding to the Course_Assigned table a few fields that include a session_id, start_date, and end_date could be used to directly connect a user to a particular session.

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.