I have 4 tables
- Account
- Admin
- User
- Role
The account table contains the email and password to login.
An account can either be an admin or an user.
An user has a registerdate
An admin has an adminnumber, but no registerdate (different attributes)
The role table contains the role name, either admin or user.
An account currently contains foreign-key relationships with all other tables. This isn't ideal, since depending on the role, one of the tables will be left empty.
I need all account to be in the same table, yet depending on the role it should have different links and attributes.
What is the best way to tackle this?
I use MSSQL