Entity Relationship Model for Student / Advisor application

故事扮演 提交于 2019-12-13 15:44:11

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/8507729/entity-relationship-model-for-student-advisor-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!