I'm designing a DB for a small school project, but currently struggling with the design of the User table and it's related tables.
- A User can be a Student, a Teacher or an Admin.
- Students, Teachers and Admins share some common data (name, last_name, login dates) but each type has unique information (Teachers have a professional license; Students have one Carrer associated to their profile, and so on).
So I'm stuck with two designs. The first one is as it follows:
This aproach allows me to have the unique fields (not listed in the image) in each type table, but the problem lies with the field duplication.
The second approach would be to have a single User table and a second User_data table (instead of the three separated tables in the first design), but I think that would create another set of problems, like having NULL values if the current register is a Student, Teacher or Admin.
Any suggestions on how to improve this design?