0

A teacher could be an evaluator and also be an evaluatee. How can I achieve this?

ERD diagramm

John K. N.
  • 17,649
  • 12
  • 51
  • 110

2 Answers2

0

You would just add another foreign key to Eval_Result to link to the Evaluatee

So you would have:

Teacher

  • T_ID - primary key
  • Teacher info - other fields

Eval_Result

  • Eval_ID - primary key
  • Evaluator_ID - teacher that did the evaluation - foreign key to Teacher
  • Evaluatee_ID - teacher being evaluated - foreign key to Teacher
  • Results - other fields
DJ.
  • 135
  • 4
0

Teacher as evaluator can evaluate multiple Teachers (evaluatees). This is a one-to-many self-referencing relationship.

Evaluator -|--< Evaluatee

Teacher:

id [Primary Key]
name
evaluator [Foreign Key referencing Teacher's id]
evaluation result id [Foreign Key referencing Evaluation Result's id]

Evaluation Result:

id [Primary Key]
result details

A Teacher (evaluatee) can have one evaluation result.

Teacher (evaluatee) -|--|- Evaluation Result

prasad_
  • 440
  • 2
  • 9