Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

EDIT: PLEASE DON'T CONSIDER ARROWS :)

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

share|improve this question
4  
And your question is? –  a_horse_with_no_name Nov 30 '12 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 ? –  DextOr Dec 1 '12 at 7:16

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 at 19:36
    
@Andriy: I think miracle173 is right. –  ypercube Dec 1 '12 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 '12 at 8:52
    
thanks @miracle173 for the answer, nice explanation and also beautiful Diagram :> –  DextOr Dec 3 '12 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.

share|improve this answer
    
But what about this statement "however a student can have only one mentor" ? :/ –  DextOr Dec 1 '12 at 7:17
    
@Dextor: that is taken care by the 1:N relationship between Teacher and Student –  ypercube Dec 1 '12 at 11:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.