-2

I am attempting to design a DB that houses peoples time that is assigned to a project.

So for example, Bill is assigned to 20 hours on project A, and 20 hours on project B for weeks 50-52 of this year. For weeks 1-9 of next year he is assigned to project C for 40 hours a week.

How would you structure your database so that it could house all of this information for n number of people and projects?

  • 2
    This is too broad a question. You should probably search the internet for more of a database design lecture or overview. – Matt Runion Sep 25 '18 at 22:30
  • https://stackoverflow.com/questions/7296846/how-to-implement-one-to-one-one-to-many-and-many-to-many-relationships-while-de – Blackhawk Sep 25 '18 at 22:55

1 Answers1

1

Without knowing more details, it looks like you need three tables:

  1. Person
  2. Project
  3. Person2Project (the join table)

You would enter your employee information in the Person table, Project Information in the Project table, and use the third table to join a person to a project using a primary key/foreign key. The information regarding weeks and hours would be included in the third table.