You are on page 1of 2

Employee Table [employee Id, department Id, team Id]

Projects Table [project Id, department Id, team Id]


Department Table [department Id, project Id]
Skills Table [skillId, employee Id]
Team Table [team Id]

 Employees [ employeeId , employeeName ]


 Departments [ departmentId , departmentName ]
 Projects [ projectId , projectName ]
 Skills [ skillId , skillName ]
 Teams [ teamId , teamName ]

now do the relationships, which are either one-to-many or many-to-many

one-to-many relationships can be implemented easily by adding a Foreign Key to the “many” entity table, but many-to-
many relationships require a"junction" or relationship table

Each employee works in a department

this is many-to-one, i.e. one-to-many, so add the FK to Employees

 Employees [ employeeId , employeeName , departmentId ]

An employee may possess a number of skills

presumably several employees can have the same skill, so this is many-to-many and we need a junction table

 EmployeeSkills [ employeeId , skillId ]

A department may participate in none/one/many projects

 DepartmentProjects [ departmentId , projectId ]

An employee may be engaged in none/one/many projects

 EmployeeProjects [ employeeId , projectId ]

Project teams consist of at least one member

 TeamMembers [ teamId , employeeId ]

the only thing we haven’t covered yet are the two “at least one” conditions, but i’ll postpone talking about those for the
time being

You might also like