This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm new to data modelling, and I'm working on a data model and ERD for an OKR (Objectives & Key Results) tool.
In my model I have Users, Teams and Managers (which are actually also Users). There are many-to-many relationships between Users and Teams and between Users and Managers(Users). I'm now looking to add an additional many-to-many relationship between Teams and Managers, and I don't know how to proceed.
The end result is that a User can select a Team to which they have a relationship, and then select a Manager that is both a Manager of the Team and a Manager of the User.
Current Tables:
TableName | Fields |
---|---|
User | id [pk], name, email, ... |
Team | id [pk], name, ... |
UserManager | user_id [fk=User.id], manager_id [fk=User.id] |
UserTeam | user_id [fk=User.id], team_id [fk=Team.id] |
I was thinking about adding am is_manager bit value to the UserTeam table to indicate whether a specific user is also a manager of this Team, but I didn't like the idea of also having Managers identified through the UserManager table.
Thoughts on a better way to proceed? Thanks.
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Database/co...