Some of the Users in my database will also be Practitioners.
This could be represented by either:
- an is_practitioner flag in the User table
- a separate Practitioner table with a user_id column
It isn't clear to me which approach is better.
Advantages of flag:
- fewer tables
- only one id per user (hence no possibility of confusion, and also no confusion in which id to use in other tables)
- flexibility (I don't have to decide whether fields are Practitioner-only or not)
- possible speed advantage for finding User-level information for a practitioner (e.g. e-mail address)
Advantages of new table:
- no nulls in the User table
- clearer as to what information pertains to practitioners only
- speed advantage for finding practitioners
In my case specifically, at the moment, practitioner-related information is generally one-to-many (such as the locations they can work in, or the shifts they can work, etc). I would not be at all surprised if it turns I need to store simple attributes for practitioners (i.e., one-to-one).
Questions
- Are there any other considerations?
- Is either approach superior?