Number 3 is the best option you have proposed (slightly updated to clarify):
- create a table for all of them for login and password and everything else that is common, and a separate table for all other things that are not common, and associate them with FK
Except for saving the password, save the hashed version of the salty password.
An alternative would be to assign groups and / or roles to your users. This can be more flexible than a fixed table structure that allows you to dynamically add new roles. But it depends on your needs, whether it is useful for you or not.
As Aaronout noted, in the main table, you need an AccountType so that the user can have only one of the roles. You must remember to check the value of this column when joining tables to ensure that the user has only one role active.
The unique foreign key constraint ensures that the user can have only one role.
Mark byers
source share