Table Creation
Due: 11:00pm, Thursday, November 30, 2023
Assignment Description
In this assignment, we are going to model a fictional company. Write a SQL
script called company.sql that has CREATE TABLE statements for the
following relations and fields:
employeefirst_namelast_namessn(Social Security Number)dob(date of birth)start_date(date the employee was hired)email(company email address)salarysupervisor_ssn(Social Security Number of the supervisor)department_id(ID for the department the employee works for)
departmentdepartment_idnamemanager_ssn(Social Security Number of the department’s manager)
projectproject_idnamedepartment_id
employee_projectemployee_ssn(employee Social Security Number)project_idhours(hours per week the employee works on the project)
Grading Criteria
Appropriate choice of data types for each field.
Appropriate choice of primary key for each relation.
Appropriate foreign key constraints for references to other relations.
Additional constraints:
- Employees must have a first name, last name, social security number, date of birth, and hire date.
- Departments must have an ID and a name.
- Projects must have a project ID, name, and department ID.
- Employees cannot work more than 60 hours on a project.
Turning in the Assignment
To turn in the assignment, execute the submit script by running the command
make submit
from within the project9 directory.