Question

I'm building a web application concerns a student and an adviser. The student will select his independent study and an adviser will supervise it. I am struggling to find the correct relationship for my program.

Basically the actors in my application are.

a Student can select 1 independent study.
a Student can only have 1 Adviser.
an Adviser can supervise multiple Students.
a coordinator can be an adviser also

My attempt to make ERD for my application.

Student - > Adviser (1 to many)

Coordinator - > Adviser (1 to 1)

But the problem is that I need a table that indicates that advisor A supervises student X. How should I do this?

Was it helpful?

Solution

Here's another ERD based on ypercube's comments on my other answer:

enter image description here

In this model, if there's an Adviser record with the Coordinator's id as it's id, that Coordinator is an Adviser.

OTHER TIPS

Here's an ERD:

enter image description here

My understanding is that a Coordinator is simply an Adviser which supervises another Adviser. If an Adviser's parent_id is set, that "parent" is the Adviser's Coordinator. My Diagram allows for a Coordinator to supervise more than one Adviser because that what makes sense to me, but that relationship could be changed to One-to-One (1:1).

I use MySQL Workbench.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top