statements are

"A teacher can teach many courses. A student can enrol in many courses. A course may be a part of one or many programmes. A teacher can be mentor of many students, however a student can have only one mentor."

Having confusion is Mentor an entity or not

I have drawn two E-R diagrams with

E-R diagrams with Mentor entity

and without mentor

E-R diagrams without Mentor entity

this diagram can be accessed here

  • 4
    And your question is?
    – user1822
    Nov 30, 2012 at 11:40
  • :D my Q is "is mentor as entity required ?" and how to show the statement "however a student can have only one mentor" in above ER diagram ?
    – Code Spy
    Dec 1, 2012 at 7:16

2 Answers 2


is Mentor of is a relationship between a teacher and a student. From your diagram I conclude that a course can be only be enroled by one student. I is not explicitely stated but I think that a course can be enroled by many students. Also I think that a course can be part of more then one program. Finally I get the following diagram:

enter image description here

The diagram is created with dia and the source can be found here.

In the diagram all relationships are defined mandatatory. So the the diagram should be refined in respect to this. For example it seems to be wrong that each teacher is mentor of at least one student.

  • Looks good to me but something seems definitely missing. According to this chart, a teacher can teach many courses and be a mentor of many students. But the chart also seems to imply that the many courses a student enrols in are supposed to be taught by the same teacher, who is also the student's mentor. Is that actually all right?
    – Andriy M
    Dec 1, 2012 at 13:16
  • 1
    @Andriy M: No, you cannot read an ER diagram this way. The Student-enrols-Course part of the ER diagram says: "A student is enroled in one or more courses" and "In a course one ore more students are enroled". The teacher-teaches-course part says:"A teacher teaches one or more courses" and "A course is taught by one teacher". This is the precise meaning of these parts of the ER diagram. From these four statements you cannot conclude that all the courses a student is enroled in are teached by the same teacher.
    – miracle173
    Dec 1, 2012 at 19:36
  • @Andriy: I think miracle173 is right. Dec 1, 2012 at 21:08
  • Thank you for the explanation as well as for the update. What you noted in your update is one other thing that bothered me and it was probably the source for the misapprehension expressed in my first comment. @ypercube: Thanks, I agree now.
    – Andriy M
    Dec 2, 2012 at 8:52
  • thanks @miracle173 for the answer, nice explanation and also beautiful Diagram :>
    – Code Spy
    Dec 3, 2012 at 5:00

There's no need for Mentor being an entity type, as the relation type "Mentors in", which means "is Mentor of", already says, that a teacher has the role of a mentor.

  • But what about this statement "however a student can have only one mentor" ? :/
    – Code Spy
    Dec 1, 2012 at 7:17
  • @Dextor: that is taken care by the 1:N relationship between Teacher and Student Dec 1, 2012 at 11:25

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.