Every entity whether it is teacher, student admin or superadmin, they have login credentials and a role.
So I have decided to implement subtype and supertype relation.
Users
------------
id
email
password
roleId
Teachers
-------------
userId -> foreign key as well as primary key
name
Students
--------------
userId
name
School
-------------
userId
name
But school, teacher and students are also related to each other.
So teacher or student will have another foreign key school_id
.
Should I go with this schema or drop the primary key constraint for userId in student, teacher and school.
Should I give them their own unique primary keys.