Data modeling with people of different profiles

0

I need to create a system where people can play different roles. (eg teachers, students and server). The main information is:

Teacher profile: name, address, email, area of expertise, discipline, etc. Student Profile: Name, Address, Email, Registration, Course, Country, etc. Server profile: name, address, email, stocking, sector, position, level, etc.

The question is: What is the best way to model a bank with these tables?

    
asked by anonymous 28.03.2017 / 15:03

1 answer

1

You have the following option:

1- Create a Person table with a Primary Key ID. In this table you will have all the common data of the people (Teacher and Student).

2- Create a Teacher table that has the Foreign key (FK) the Person ID. And just add teacher data.

3- Create a Table that has the foreign key (FK) the Person ID. And just add the student data.

This is known as specialization.

Hugs!

    
28.03.2017 / 15:27