Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/* 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago