Table Creation
Due: 11:00pm, Tuesday, November 29, 2022
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:
company.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)
company.departmentdepartment_idnamemanager_ssn(Social Security Number of the department’s manager)
company.projectproject_idnamedepartment_id
company.employee_projectemployee_ssn(employee Social Security Number)project_idhours(hours per week the employee works on the project)
Grading Criteria
All tables must be within a schema called
company.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.
Submission
Turn in the completed SQL script to the appropriate folder on D2L. Do not change the name of the script.