Question: /* Question 1 ************************************************************** Create DEPARTMENT table Run this code first and submit the results per the assignment. ************************************************************** */ DROP TABLE IF EXISTS DEPARTMENT;

/* Question 1 ************************************************************** Create DEPARTMENT table Run this code first and submit the results per the assignment. ************************************************************** */ DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DepartmentName CHAR(35) NOT NULL, BudgetCode CHAR(30) NOT NULL, OfficeNumber CHAR(15) NOT NULL, DepartmentPhone CHAR(12) NOT NULL ); /* Question 2 ************************************************************** Create EMPLOYEE table Run this code next and submit the results per the assignment. ************************************************************** */ DROP TABLE IF EXISTS EMPLOYEE; CREATE TABLE EMPLOYEE ( EmployeeNumber CHAR(20) NOT NULL, FirstName CHAR(25) NOT NULL, LastName CHAR(25) NOT NULL, Department CHAR(30) NOT NULL, Position CHAR(35) NULL, Supervisor INTEGER NULL, OfficePhone CHAR(12) NULL, EmailAddress VARCHAR(100) NOT NULL ); /* Question 3 ************************************************************** Create PROJECT table Run this code next and submit the results per the assignment. ************************************************************** */ DROP TABLE IF EXISTS PROJECT; CREATE TABLE PROJECT ( ProjectID INTEGER NOT NULL, ProjectName CHAR(50) NOT NULL, Department CHAR(35) NOT NULL, MaxHours NUMERIC(8,2) NOT NULL, StartDate DATE NULL, EndDate DATE NULL ); /* Question 4 ************************************************************** Create ASSIGNMENT table Run this code next and submit the results per the assignment. ************************************************************** */ DROP TABLE IF EXISTS ASSIGNMENT; CREATE TABLE ASSIGNMENT ( ProjectID CHAR(20) NOT NULL, EmployeeNumber INTEGER NOT NULL, HoursWorked NUMERIC(6,2) NULL ); /* Question 5 - Four Rows of Employee */ INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 1,'Mary', 'Jacobs', 'Administration', 'CEO', '360-285-8110', 'Mary.Jacobs@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 2,'Rosalie', 'Jackson', 'Administration', 'Admin Assistant', '360-285-8120', 'Rosalie.Jackson@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 3,'Richard', 'Bandalone', 'Legal', 'Attorney','360-285-8210', 'Richard.Bandalone@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 4,'George', 'Smith', 'Human Resources', 'HR3','360-285-8310', 'George.Smith@WP.com'); /* Question 6 - Remaining Employees */ INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 5,'Alan', 'Adams', 'Human Resources', 'HR1', '360-285-8320', 'Alan.Adams@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 6,'Ken', 'Evans', 'Finance', 'CFO', '360-285-8410', 'Ken.Evans@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 7,'Mary', 'Abernathy', 'Finance', 'FA3', '360-285-8420', 'Mary.Abernathy@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 8,'Tom', 'Caruthers', 'Accounting', 'FA2', '360-285-8430', 'Tom.Caruthers@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 9,'Heather', 'Jones', 'Accounting', 'FA2', '360-285-8440', 'Heather.Jones@WP.com'); INSERT INTO EMPLOYEE(EmployeeNumber, FirstName, LastName, Department, Position, OfficePhone, EmailAddress)VALUES( 10,'Ken', 'Numoto', 'Sales and Marketing', 'SM3', '360-287-8510', 'Ken.Numoto@WP.com');

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!