Consider the following scenario:
Tables:
- Employee (EmpId (PK), name)
- TeamMembers (TeamId (PK), EmpId (PK))
- Project (ProjId (PK), TeamId)
I really want to avoid using a composite PK, but the only way I can see from the problem is to create a Team table with only one TeamId (PK) column (I don't want to store information related to a team other than its members) ( EDIT : if I will create a team table, I will add TeamMeberId to the TeamMembers table and make it PK)
Another problem with the current setup is that I cannot establish a relationship for TeamId between the Project and TeamMebers tables
Should I just create a column table of 1 column? What is the best approach in this case?
EDIT
just to clarify the situation, the only thing I want to know about this team is its existence, no additional information about any kind
EDIT2
Tables New design (is something wrong?):
- Employee (EmpId (PK), name)
- Team (TeamID (PC))
- TeamMembers (TeamMemberId (PK), TeamId (FK), EmpId (FK))
- Project (ProjId (PK), TeamId (FK))
sql-server database-design
roman m Apr 21 '09 at 20:18 2009-04-21 20:18
source share