I'm planning a database schema, and I've encountered a situation where I don't know the best way to proceed. I'm really looking for a list of pros and cons to each of my proposed solutions, perhaps followed by a recommendation for which would conform to best databasing practice.
So, the problem is that I have two entities with multiple many-to-many relationships between them. The two tables are Teams and People; a Team is composed of many People, and a Person could have one or many roles on the Team. Roles include team leader, team member, team follower, etc. A person may have more than one role for a particular team, but ideally a subset of these roles are mutually exclusive, while the rest are not.
Here are the solutions I've considered:
1) Create a separate junction table for each role. The presence of a row in each table signifies that a single person belongs to a single team, and the particular table indicates the person's role on the team. Mutually exclusive roles would have to be enforced at the application level.
2) Create a single junction table and store an enumeration on that table to specify which role a person has. A given person-team combo may have multiple rows in this table, one for each role that the person has with the team. Mutual exclusivity of certain roles would have to be enforced on the application level.
3) Create a single junction table, and store a list of boolean flags on the table, one for each role. Each person-team combo has a single row in the table, and the flags determine which roles the user has on that team. Mutual exclusivity could be enforced at the database level, because all mutually exclusive roles could share a single enumerated field on the table.
4) Create two junction tables. This is sort of a combination of (2) and (1) that allows mutual exclusivity to be enforced at the database level. There would be one junction table with an enumeration for mutually exclusive roles, and the other junction table (with enumeration) would handle all non-exclusive roles.
Is there anything I'm forgetting? Which option seems the most natural?
Thanks