A solution to the Week 3 in-class exercise

  1. Professors have a SSN, name, age, rank and research specialty
    SSN  name  age  rank  research specialty
    ---   |    /   /      /
      \   |   /   /      /
      --------------------
      |    Professor     |
      --------------------
    
  2. Projects have a project number, a start and end date, a budget
    Pnum   start  end  budget
    ----     /    /     /
      \     /    /     /
      -------------------
      |    Project      |
      -------------------
    
  3. Students have a SSN, name, age, and year
    SSN   name   age  year  
    ---    \     /     / 
      \     \   /     /
      ------------------
      |    Student     |
      ------------------
    
  4. Each project is managed by one professor (the principle investigator)
    (6) Professors can manage and/or work on multiple projects
    Pnum   start  end  budget                               SSN   name ... 
    ----     /    /     /                                   ---    / 
     -------------------               /         \        ------------
     |    Project      | =========>> < Managed By > ----- | Professor |
     -------------------               \         /        -------------
    
  5. Each project is worked on by one or more professors (co-investigators)
  6. Professors can manage and/or work on multiple projects
    Pnum   start  end  budget                                 SSN   name ... 
    ----     /    /     /                                     ---    / 
     -------------------               /           \         ------------
     |    Project      | =========== < Worked on By  > ----- | Professor |
     -------------------               \            /        -------------
    
  7. Each project is worked on by one or more students
    Pnum   start  end  budget                             SSN   name ... 
    ----     /    /     /                                 ---    / 
     -------------------               /        \         ---------
     |    Project      | =========== < Works On  > ----- | Student |
     -------------------               \        /         ---------
    
    Q: why not have a single Worked On Relationship set involving Project, Student and Professor entities?