I am working on a project where there are several types of users (students and teachers). Currently to store the user's information, two tables are used. The users
table stores the information that all users have in common. The teachers
table stores information that only teachers have with a foreign key relating it to the users
table.
users
table
- id
- name
- 34 other fields
teachers
table
- id
- user_id
- subject
- 17 other fields
In the rest of the database, there are no references to teachers.id
. All other tables who need to relate to a user use users.id
. Since a user will only have one corresponding entry in the teachers table, should I just move the fields from the teachers table into the users table and leave them blank for users who aren't teachers?
e.g.
users
- id
- name
- subject
- 51 other fields
Is this too many fields for one table? Will this impede performance?