0
I need to create a system where people can play different roles. (e.g. They can be teachers, students and server). The main information is:
Teacher profile: name, address, email, area of activity, discipline, etc. Student profile: name, address, email address, Registration, Course, Country, etc Server profile: name, address, email, capacity, sector, position, level, etc.
The question is: What is the best way to model a database with these tables?
A
discente
may also bedocente
?– Rene Freak
I don’t understand why people think that the fact that a person plays a different role should be someone else. Person is person, the role she has is accessory. It is the same as: http://answall.com/q/191832/101 or http://answall.com/q/54177/101 or http://answall.com/q/80948/101
– Maniero
A student can not be a teacher. However, who was a student one day can be a teacher, or server. It’s not just playing different roles. There’s a lot of data about each profile I didn’t put in the question to not make it too big. Ex. Course and registration are exclusive data of the Student. Capacity, position, level are exclusive data of the server. Area of action and discipline are exclusive data of the teacher.
– Renato Paiva
In this case, see @Maycon-Pires' reply which is practically what I was going to say: a single table for people and a table for each role they can act on, linked by primary/foreign key pairs.
– Rene Freak
Thank you, @Renefreak.
– Renato Paiva