Reputation: 742
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?
Upvotes: 2
Views: 2180
Reputation: 1
I want to look and er diagram for my topic Each semester, each student must be assigned an advisor who counsels students about degree requirements and helps students register for classes Each student must register for classes with the help of an advisor, but if the student's assigned advisor is not available, then the student may register with any advisor. We want to keep track of students, the assigned advisor for each, and the name of the advisor with whom the student registered for the current term.
Upvotes: 0
Reputation: 8326
Here's another ERD based on ypercube's comments on my other answer:
In this model, if there's an Adviser record with the Coordinator's id as it's id, that Coordinator is an Adviser.
Upvotes: 3
Reputation: 8326
Here's an ERD:
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.
Upvotes: 2