This document outlines the creation of an employee database for SunTrust Consulting Inc. including defining tables, relationships, and constraints through entity relationship diagrams and SQL scripts for data definition and data manipulation. The database will store information on employees, departments, jobs, projects, assignments, contacts and dependents to help HR and management access and analyze employee and project data.
Hidden Camera 3 APIs in Android 4.4 (KitKat)Balwinder Kaur
Android 4.4 (KitKat) shipped with some hidden Java APIs for the new Camera 3 APIs. This slide deck was presented at AnDevCon 2013 held in Burlingame, CA. It covers the history of the new Camera Framework, hidden APIs and some basics of the Camera Platform Framework.
https://github.com/lbk003/Cam3HiddenAPIs
Components of DBMS describe what are the different parts that work together for creating, and managing the database that forms a complete system named DBMS(database management system). data refers to all the single items that are stored in the database. It needs to be secure and managed in this way so that only authenticated persons can use it and can make changes or store it in a very easy way.
International Project Management EnvironmentsDavid Prat
Aimed to provide tools to project managers that deal with cross-cultural teams and international stakeholders. The work focuses on providing the project manager with the skill of seeing the big picture of multiculturalism and to get closer distant issues such as globalization.
Professor Lourdes Guàrdia, How to evaluate generic Competences using Web 2.0:...mediazoo
One of the demands that today’s society is making of the European Space of
Higher Education (ESHE) is the establishment of a system that favors providing students with a comprehensive education that aims to achieve the optimum development of the skills needed in our current society. Another requirement concerns reforming the methodologies applied in classrooms, focusing the emphasis on learning and evaluation (personal, social and professional) based on competences and giving students a more prominent role in these processes. This social and academic framework is based on an organic model of information in which information is reused, reinterpreted and returned.
We are talking about promoting complex methodological changes which involve the redefinition of the whole concept of learning and evaluation which are key aspects of the education system. Faced with this outlook, the Open University of Catalonia (UOC) has devised a new transverse evaluation instrument based on learning competences: the eTransfolio.
Hidden Camera 3 APIs in Android 4.4 (KitKat)Balwinder Kaur
Android 4.4 (KitKat) shipped with some hidden Java APIs for the new Camera 3 APIs. This slide deck was presented at AnDevCon 2013 held in Burlingame, CA. It covers the history of the new Camera Framework, hidden APIs and some basics of the Camera Platform Framework.
https://github.com/lbk003/Cam3HiddenAPIs
Components of DBMS describe what are the different parts that work together for creating, and managing the database that forms a complete system named DBMS(database management system). data refers to all the single items that are stored in the database. It needs to be secure and managed in this way so that only authenticated persons can use it and can make changes or store it in a very easy way.
International Project Management EnvironmentsDavid Prat
Aimed to provide tools to project managers that deal with cross-cultural teams and international stakeholders. The work focuses on providing the project manager with the skill of seeing the big picture of multiculturalism and to get closer distant issues such as globalization.
Professor Lourdes Guàrdia, How to evaluate generic Competences using Web 2.0:...mediazoo
One of the demands that today’s society is making of the European Space of
Higher Education (ESHE) is the establishment of a system that favors providing students with a comprehensive education that aims to achieve the optimum development of the skills needed in our current society. Another requirement concerns reforming the methodologies applied in classrooms, focusing the emphasis on learning and evaluation (personal, social and professional) based on competences and giving students a more prominent role in these processes. This social and academic framework is based on an organic model of information in which information is reused, reinterpreted and returned.
We are talking about promoting complex methodological changes which involve the redefinition of the whole concept of learning and evaluation which are key aspects of the education system. Faced with this outlook, the Open University of Catalonia (UOC) has devised a new transverse evaluation instrument based on learning competences: the eTransfolio.
Косых В.Н. Социальные медиа VS традиционные коммуникации в PRprasu1995
Статья опубликована в сборнике:
PR в изменяющемся мире: Региональный аспект: сборник статей/ под ред. М.В. Гундарина, А. Г. Сидоровой, Ю. В. Явинской. – Вып. 9. – Барнаул: Изд-во Алт. ун-та, 2011.
Soy Ingeniero de Obras Públicas con 10 años de experiencia como jefe de obra civil. He realizado obras significativas tanto en Guipúzcoa como en Vizcaya. Mi experiencia va de obras de largo plazo y grandes recursos/presupuesto a realizar hasta 3 obras pequeñas simultáneamente. También he realizado obras de edificación como rehabilitaciones de oficinas, así como viviendas de nueva construcción.
En los últimos años he compatibilizado el trabajo como jefe de obra con el de realización de presupuestos para licitación con Promotores públicos y privados, también en UTE con grandes compañías, teniendo bajo mi responsabilidad a dos ingenieros para la redacción de las ofertas.
Soy un apasionado de la tecnología, siempre al día y dispuesto a aplicar los últimos avances a nuestro trabajo, tanto en los procedimientos y materiales de construcción como con las últimas herramientas de gestión y diseño.
Possible Algorithms of 2NF and 3NF for DBNorma- A tool for Relational Databas...IDES Editor
DBNorma [1] is a semi automated database
normalization tool, which uses a singly linked list to store a
relation and functional dependencies hold on it. This paper
describes possible algorithms that can be used to normalize a
given relation represented using singly linked list. These
algorithms are tested on various relational schemas collected
from several research papers/resources and output validated.
We have also determined the time required to normalize a given
relation in 2NF and 3NF and found that it is proportional to
number of attributes and number of functional dependencies
present in that relation. The time required, on average, is in
order of 186 msec for 2NF and 209 msec for 3NF. By observing
time required, one can conclude that these algorithms can be
used for normalizing relations within the shorter time; this is
specifically needed when database designer is using a universal
relation.
A mini DBMS Complier used to carried out CREATE, SELECT, UPDATE, INSERT, DELETE, DESC like comands to execute.
Using >>--> C++ and File Streams
Regards
Abhijeet Kalsi ..!
Experienced Software Engineer with a demonstrated history of working in the information technology and services industry. Skilled in ETL , Business Intelligence (BI), Oracle Data Integrator (ODI) , OBIEE , SQL , PLSQL and JAVA. Strong engineering professional with a Bachelor of Engineering (B.E.) focused in Information Technology from B.V.B.C.E.T..
3. Deliverable 1 – Project Charter
Database Objective
Objective of this project is to create an Employee Database which will store
information about employees working for SunTrust Consulting Inc. SunTrust is IT
consulting company which has assigned many projects to its several employees.
This database will contain all the information about the employees working for
the SunTrust , such as Employee’s ID, SSN, first name, Date of birth, home address,
office phone number, emergency contacts, department, languages, salary etc. It also
stores the information about project such as project ID, project name, the assigned
employee and the number of hours worked by each employee.
Currently, SunTrust Company is using an access, single user database, to record
employee data. Moving this to multiuser database will enable individual employees to
access most of the employee’s data online. At the same time, company executive can see
the cost associated with each project.
Purpose and benefits
This multi user database will help HR to ease their workload by giving employees
access to their data via web and letting them update their information. Moreover
employees will be able to search the database and find contact information about other
employees like addresses and phone numbers. Managers will have access to their
employee’s data and project’s cost which can be used to make a better business decision.
2
4. Furthermore, mangers would be able to create and finalize reports of projects like the
average cost of each projects and total salary paid to each employee.
Technical Detail
This database will run in the UMUC Unix server dbcourse2 which will be
accessed via PortalPutTTY terminal emulator using SSH network protocol. The software
that would be used is Oracle 10g. Data definition language (DDL) would be used to
create the database. Data manipulation language (DML) and Transaction control
language (TCL) would also be utilized to manipulate the database and make changes or
undo transactions to the database.
Tools
Microsoft Visio 2010 and Oracle Data Modeler would be used to create the Entity
relationship diagram (ERD). Notepad +++ and notepad would be used to write and edit
SQL statements. Microsoft Project 2007 would be used to create the project schedule.
Project Schedule
Please open the Microsoft Project file for complete project schedule attached with this
document.
3
5. Deliverable Deliverable Schedule Member Complete By
1 Project Charter June 5
2 ERD June 12
3 Data Definition Language June 19
June 26
4 Data Manipulation Language
July 1
5 SQL Queries
July 8
6 Database Maintenance Scripts
July 24
7 Functons & Stored Procedure
July 29
8 Explain Tool
July 29
9 Object Relational Exercises
10 Lab Project Report August 5
Table 1 Project Schedule
4
7. ERD Description
Entity Description
Emplpoyee Stores data about an employee
Assignment Stores data relating to an assignment assigned to
an employee
Project Stores data of a project
Department Stores data of a department
Dependent Stores data of the dependent assiocated with an
employee
Job Stores data of a job
Contact Stores the contact of an employee
Table 2 ERD Description
Constraints
Primary keys
Name Object Description
dept_dept_id_pk Department Adds the primary key constraint to the
department table.
job_Job_Code_pk Job Adds the primary key constraint to the job
table.
PK_Proj_Num_pk Project Adds the primary key constraint to the
project table.
Emp_id_pk Employee Adds the primary key constraint to the
employee table.
assign_assigment_num_pk Assignment Adds the primary key constraint to the
assignment table
con_contact_id_pk Contact Adds the primary key constraint to contact
table.
depend_Depend_num_pk Dependent Adds the primary key constraint to the
dependent table.
Table 3 Primary Key Contraints
6
8. Foreign Keys
Name Object Description
dept_dept_m8gr_id Department Adds the FK constraint linking Employee to
Department using Employee PK column
(Emp_ID) & Department (Dept_Mgr_ID)
column.
proj_proj_mgr_id_fk Project Adds the FK constraint linking Employee to
Project using Employee PK column
(Emp_ID) & Project (Proj_Mrg_ID)
column.
emp_dept_id_fk Adds the FK constraint linking Department
Employee to Employee using Department PK column
(Dept_ID) & Employe(Dept_ID) column.
emp_job_code_fk Add the FK constraint linking Job to
Employee using Job PK column (Job_Code)
Table 4 Foreign Key Employee (Job_Code) column.
& Constraint
assign_Emp_Num_fk Adds the FK constraint linking Employee to
Assignment Assignment using Employee PK column
(Emp_ID) & Assignment (Emp_ID)
column.
assign_Proj_Num Adds the FK constraint linking Project to
Assignment using Project PK column
(Proj_Num) & Assignment (Proj_Num)
column.
Depend_Emp_id_fk Dependent Adds the FK constraint linking Employee to
Dependent using Employee PK column
(Emp_ID) & Dependent(Emp_ID) column.
con_emp_id_fk Contact Adds the FK constraint linking Employee to
Contact using Employee Pk column
(Emp_ID) & Contact (Emp_ID) column.
7
Table 5 Not Null Constraint
9. Not Null
Name Object Description
dept_ex_nn Department Adds the not null constraint to Dept_Ex column.
dept_phone_nn Adds the not null constraint to Dept_Phone column.
dept_name_nn Adds the not null constraint to Dept_Name column.
job_description_nn Job Adds the not null constraint to the job_description
column.
proj_proj_mgr_id_nn Project Adds the not null constraint to the Proj_Mrg_ID
column.
proj_proj_name_nn
Adds the not null constraint to the
Proj_Name column.
proj_due_date_nn
Adds the not null constraint to Due_Date column.
emp_last_name_nn Adds the not null constraint to Last_Name column.
emp_dob_nn Adds the not null constraint to DOB column.
Employee
emp_emp_rate_nn Adds the not null constraint to Emp_Rate
Column.
Adds the Dept_ID column not null constraint
dept_id_nn
Adds the not null constraint to First_Name column.
emp_First_name_nn
enp_job_code Adds the not null constraint to the Job_code column.
8
10. emp_gender_nn Adds the not null constraint to the Gender column.
assign_emp_num_nn Adds the not null constraint to the Emp_ID column.
assign_hours_nn Assignment
Adds the not null constraint to Assign_Hours
column.
assign_project_nn
Adds the not null constraint to Proj_Num column.
depend_first_name_nn Adds the not null constraint to First_Name column.
Dependent
depend_last_name_nn Adds the not null constraint to Last_Name column.
depend_dep_dob_mn Adds the not null constraint to the Dep_Dob
column.
depend_Emp_id_nn Adds the not null constraint to the Emp_ID column.
depend_Depend_Type_nn Adds the not null constraint to Depend_Type
column.
Table 6 Not Null Constraint
9
11. Relationships
Relationship Name Entities Relationship Description
Emp_Dpet Rel Employee & Department 1:M One or more employee works for a
department.
A department employes one or more
employees
Dep_Emp Rel Department& Employee 1:1 One and only one employee is the manger of
a department.
A department is managed by an employee.
An employment is assigned to zero or more
Emp_Assign Rel Employee & Assignment 1:M assignment(s).
Zero or more assignment(s) is assiocated with
an employee.
Assign_Project Rel Assignment & Project 1:M One or more assignments can be assiocated
with a project.
A project can be assiocated with one or more
assignments.
Cont_Emp Rel Contact & Employee 1:M An employee is assiocated with one or more
contact listing(s).
One or more contact listing(s) is assiocated
with an employee.
Emp_Job Rel Employee & Job 1:M One or more employees can be assiocated
with the same job type.
A job type is assiocated with one or more
employees.
Depend_Emp Rel Dependent & Employee 1:1 One and only one depedent may be assiocated
with an employee.
10
12. Proj_Emp Rel Project & Employee 1:1 One and only one employee is the manager of
a project.
A project is managed by an employee.
Table 7 Relationships
11
13. Deliverable 3 - Data Definition Language
/* creates the department table */
CREATE TABLE DEPARTMENT
(
Dept_ID Number ,
Dept_Name VARCHAR2(50),
Dept_Phone Number,
Dept_Mgr_ID Number ,
Dept_Ext Number
);
/* add the primary key constraint */
Alter table department
add constraint dept_dept_id_pk primary key (dept_id);
/* add the not null constraint */
Alter table department
modify (dept_ext constraint dept_ex_nn not null)
modify ( dept_phone constraint dept_phone_nn not null)
modify (dept_name constraint dept_name_nn not null);
/* adds the foreign key constraint to the department table */
Alter table department
add constraint dept_dept_mgr_id_fk foreign key (dept_mgr_id) references employee
(emp_id);
/* creates the unique number for the pk columns */
create sequence dept_dept_id_seq
start with 0400
increment by 5
Nocycle ;
/* creates the job table */
CREATE TABLE JOB
(
12
14. Job_code Number,
Description VARCHAR2(50) CONSTRAINT job_description_nn not null
);
/*end of statement*/
/* creates the primary key constraint*/
Alter table job
add constraint job_Job_Code_pk PRIMARY KEY(Job_Code)
/*end*/
/* creates the table project*/
CREATE TABLE PROJECT
(
Proj_Num Number ,
Proj_Mgr_ID Number,
Proj_name VARCHAR2(50),
Due_Date DATE
);
/* end */
/* creates pk constraint for the project table */
Alter table project
add CONSTRAINT PK_Proj_Num_pk PRIMARY KEY(Proj_Num);
/* create the foreign key constraint for project table */
Alter table project
add constraint proj_proj_mgr_id_fk foreign key (proj_mgr_id) references employee
(emp_id);
/* end of sql */
/* creates the null constraints for project table * */
Alter table project
modify( proj_mgr_id constraint proj_proj_mgr_id_nn not null )
modify (proj_name constraint proj_proj_name_nn not null)
modify( due_date constraint proj_due_date_nn not null);
/* end sql */
13
15. /* creates the employee table */
CREATE TABLE EMPLOYEE
(Emp_id Number ,
First_Name VARCHAR2(50),
Last_Name VARCHAR2(50),
SSN VARCHAR2(11),
Dob DATE,
Emp_Rate Number(10,2),
Dept_ID number ,
Gender varchar2(6),
Job_Code number
);
/* end */
/* add the primary key constraint */
Alter table employee
add constraint Emp_id_pk PRIMARY KEY(Emp_id);
/* adds the null constraints to the columnn */
Alter table employee
modify( last_name constraint emp_last_name_nn not null)
modify ( dob constraint emp_dob_nn not null)
modify ( emp_rate constraint emp_emp_rate_nn not null)
modify ( dept_id constraint dept_id_nn not null)
modify( first_name constraint emp_First_name_nn NOT NULL)
modify ( job_code constraint emp_job_code_nn not null)
modify ( gender constraint emp_gender_nn not null);
/* adds the foreign key constraint */
Alter table employee
add CONSTRAINT EMP_dept_id_fk FOREIGN KEY(Dept_ID) REFERENCES
DEPARTMENT(Dept_ID) ;
Alter table employee
add CONSTRAINT Emp_job_code_fk FOREIGN KEY(Job_Code) REFERENCES
JOB(Job_Code);
/* sql ends */
14
16. /* creates the assignment table*/
CREATE TABLE ASSIGNMENT
(
Assignment_Num Number,
Assign_Date DATE,
Assign_Hours Number(10,2),
Cost Number(20,2),
Emp_id number,
Proj_Num number
);
/*ends*/
/* creates the constraints for assignment */
Alter table ASSIGNMENT
add constraint assign_assigment_num_pk primary key ( Assignment_Num );
Alter table ASSIGNMENT
modify ( assign_date constraint assign_emp_num_nn not null)
modify ( assign_hours constraint assign_hours_nn not null)
modify ( emp_id constraint assign_emp_num not null)
modify ( proj_num constraint assign_project_nn not null );
Alter table ASSIGNMENT
add CONSTRAINT assign_Emp_Num_fk FOREIGN KEY(Emp_id)
REFERENCES EMPLOYEE(Emp_id)
Alter table ASSIGNMENT
add CONSTRAINT assign_Proj_Num FOREIGN KEY(Proj_num) REFERENCES
PROJECT(Proj_num);
/*ends*/
/* creates the table for contact*/
Create table contact
( contact_id number,
Emp_ID number,
Address varchar2(50),
Apt_Num varchar2(50),
City varchar2(30),
H_State varchar2(3),
Phone_Home number,
phone_Mobile number,
Phone_Work number
);
15
17. /* end */
/* creates the pk constraint */
Alter table contact
add constraint con_contact_id_pk primary key ( contact_id, emp_id);
/* creates the fk constraint */
Alter table contact
add constraint con_emp_id_fk foreign key (emp_id) references employee (emp_id);
/* add column */
Alter table contact
add email_office varchar2(40);
/*creates the sequence value for the assignment pk value*/
create sequence assign_assign_num_seq
start with 05020
increment by 12
Nocycle
/*ends*/
/* change sequence */
Alter sequence emp_ssn_seq
increment by 589874
/*produce unique numbers for pk columns. The database creates the number */
create sequence emp_emp_id_seq
start with 030404
increment by 130
Nocycle ;
/* create unique number for ssn*/
create sequence emp_ssn_seq
start with 201342019
increment by 1200
Nocycle
/* creates unique constraint for ssn*/
16
18. Alter table employee
add constraint emp_emp_ssn_uk unique (ssn);
/* changed the sequence value*/
Alter sequence emp_ssn_seq
increment by 498989
Nocycle;
/*ends*/
/* creates the unique sequence for pk column */
Create sequence con_contact_id_seq
start with 00020
increment by 123;
nocycle;
/* creates the unique number for project_num */
create sequence proj_proj_num_seq
start with 0900
increment by 5
Nocycle
/* end */
17
19. Deliverable 4 – Data Manipulation Language
/* inserts records into the department*/
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Quality Assurance', 2122028259, 8260);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Software Engineering', 2122028259, 6821);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'System' , 2122028259, 1926);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Network Systems', 2122028259, 4041);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Database Systems', 2122028259, 5080);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Project Management',2122028259, 8070);
Insert into department( dept_id, dept_name, dept_phone, dept_ext)
values ( dept_dept_id_seq.nextval, 'Accounting and Finance' ,2122028259,9090);
/* end of the insert statement*/
/* update department to include department manager id */
update department
set dept_mgr_id = ( select emp_id from employee where emp_id = 35084)
where dept_id = (select emp_id from employee where emp_id = 400);
update department
set dept_mgr_id = ( select emp_id from employee where emp_id = 34174)
where dept_id = ( select dept_id from department where dept_id = 405);
update department
set dept_mgr_id = (select emp_id from employee where emp_id = 30534 )
18
20. where dept_id = ( select dept_id from department where dept_id = 410);
update department
set dept_mgr_id = select emp_id from employee where emp_id = 35734 )
where dept_id = ( select dept_id from department where dept_id = 415);
update department
set dept_mgr_id = (select emp_id from employee where emp_id = 33264)
where dept_id = (select dept_id from employee where dept_id = 420) ;
update department
set dept_mgr_id = (select emp_id from employee where emp_id = 35344 )
where dept_id = ( select emp_id from employee where emp_id 425);
update department
set dept_mgr_id = (select emp_id from employee where emp_id = 36124 )
where dept_id = ( select dept_id from department where dept_id = 430);
/*end*/
/* insert records into the job table */
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'C++/.Net Developer');
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Java Developer');
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Php/ Java Script Developer')
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'HTML/XHTML Developer')
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Python Developer')
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Database Analyst');
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Database Developer');
commit;
19
22. insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Payroll Specialist'
);
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Inventory Specialist'
);
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'Test Analyst'
);
commit;
insert into job (job_code,description)
values ( job_job_code_seq.nextval, 'system Analyst'
);
commit;
/* end of the insert statement*/
/* inserts the records into the project table*/
Insert into project (proj_num, proj_mgr_id, proj_name,due_date)
values (proj_proj_num_seq.nextval, (select emp_id from employee where emp_id =
35604), 'New York Ticket Corp Payment System',
to_date ('09-sep-2010', 'dd-mon-yyyy')
);
Insert into project (proj_num, proj_mgr_id, proj_name,due_date)
values (proj_proj_num_seq.nextval,
(select emp_id from employee where emp_id = 35604),
'St Paul College Web System Development',
to_date('02-feb-2011', 'dd-mon-yyyy'));
Insert into project (proj_num, proj_mgr_id, proj_name,due_date)
values (proj_proj_num_seq.nextval,
(select emp_id from employee where emp_id =35474
), 'Citizens Bank Databae Development',
to_date('09-AUG-2012', 'dd-mon-yyyy'));
Insert into project (proj_num, proj_mgr_id, proj_name,due_date)
values (proj_proj_num_seq.nextval,
(select emp_id from employee where emp_id = 35344 ),
'WBBMN Urban TV System Development',
21
23. to_date('27-Dec-2013', 'dd-mon-yyyy'));
/* end of sql */
/* inserts records into the employee table*/
/* system enginner employee*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Sunny','McCook', emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 70),
TO_DATE('29-MAR-1978','DD-MON-YYYY '), 'Male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Mariah', 'Johnson', emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 70),
TO_DATE('19-feb-1955','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'James', 'Imgram', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 70),
TO_DATE( '20-jan-1950','DD-MON-YYYY '), 'male'
);
/*end */
/*system admin sql insert */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Joel', 'Roland', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 75),
TO_DATE( '20-dec-1950','DD-MON-YYYY '), 'male'
22
24. );
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Susan', 'Noah', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 75),
TO_DATE( '10-apr-1964','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Peter', 'Wolf', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 75),
TO_DATE( '15-sep-1955','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender )
values (emp_emp_id_seq.nextval , 'Marxwall', 'Luther', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 75),
TO_DATE( '15-jan-1952','DD-MON-YYYY '), 'male'
);
/* end sql /
/*system analyst*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Fox','Christopher',
emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 130),
TO_DATE( '19- july-1977','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Deng', 'Alian',
emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =410),
(select job_code from job where job_code = 130),
TO_DATE( '04-jun-1988', 'DD-MON-YYYY '), 'male');
23
25. /*end*/
/*database admins*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jessica', 'Andy', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 80),
TO_DATE( '01-Aug-1962','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Shirly', 'Davis', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 80),
TO_DATE( '18-Aug-1962','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id,
job_code, dob, gender)
values (emp_emp_id_seq.nextval , 'Mathew', 'Brain', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 80),
TO_DATE( '14-Aug-1980','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id,
job_code, dob, gender)
values (emp_emp_id_seq.nextval , 'Tyron', 'Banks', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 80),
TO_DATE( '18-sep-1983','DD-MON-YYYY '), 'male'
);
/*end /
/* db developer*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Donna', 'Haris', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 60),
TO_DATE( '12-oct-1982','DD-MON-YYYY '), 'female'
24
26. );
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Linda', 'Mark', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 60),
TO_DATE( '12-jul-1982','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Ruth', 'Baker', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 60),
TO_DATE( '19-mar-1975','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id,
job_code, dob, gender)
values (emp_emp_id_seq.nextval , 'Kevin', 'Kenneth', emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 60),
TO_DATE( '09-mar-1975','DD-MON-YYYY '), 'male'
);
/* db developer end * /
/* database modeler employee */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Isabella', 'Clinton'
, emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 65),
TO_DATE( '11-oct-1975','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Sanford', 'Brown'
, emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 65),
TO_DATE( '08-nov-1972','DD-MON-YYYY '), 'male'
);
25
27. Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Vonda', 'Ikenna'
, emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 65),
TO_DATE( '06-jun-1985','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Celina', 'Tobi'
, emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 65),
TO_DATE( '16-mar-1986','DD-MON-YYYY '), 'female'
);
/* end of sql */
/* database analyst */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Brenda', 'Bell'
, emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 55),
TO_DATE( '16-mar-1988','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jaqueline', 'king'
, emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 55),
TO_DATE( '04-aug-1967','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Roland', 'king'
, emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 55),
TO_DATE( '04-jan-1987','DD-MON-YYYY '), 'male'
26
28. );
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id,
job_code, dob, gender)
values (emp_emp_id_seq.nextval , 'Michael', 'Stevens', emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =420),
(select job_code from job where job_code = 55),
TO_DATE( '25-dec-1974','DD-MON-YYYY '), 'male'
);
/*end of statement*/
/* java*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Carol', 'Washington'
, emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 50),
TO_DATE( '12-jul-1984','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Rebeca', 'Peterson',
emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 50),
TO_DATE( '21-oct-1987','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id,
job_code, dob, gender)
values (emp_emp_id_seq.nextval , 'Cherri', 'Keys', emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 50),
TO_DATE( '25-apr-1983','DD-MON-YYYY '), 'female'
);
/*end of statement */
/*php/java scripts*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jerry','Springfield',
emp_ssn_seq.nextval, 30,
27
29. (select dept_id from department where dept_id =405),
(select job_code from job where job_code = 135),
TO_DATE( '18-feb-1979
','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Carlos', 'Winworth', emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code =135),
TO_DATE( '28-dec-1958','DD-MON-YYYY '), 'male'
);
/*end*/
/* c++ developer */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Patrick', 'law',
emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 45),
TO_DATE( '20-feb-1962','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jonas', 'lake'
,emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 45),
TO_DATE( '28-feb-1963','DD-MON-YYYY '), 'male'
);
/*end*/
/* HTRML/XHTML*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Addie', 'Jude',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 140),
TO_DATE( '19-may-1973','DD-MON-YYYY '), 'female'
);
28
30. Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Adams', 'Wade'
,emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 140),
TO_DATE( '20-sep-1975','DD-MON-YYYY '), 'male'
);
/*end*/
/* phython */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Robert', 'Lopez',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =405),
(select job_code from job where job_code = 145),
TO_DATE( '2-jan -1983','DD-MON-YYYY '), 'male'
);
/*end*/
/* technical writer*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Ray', 'Richmond',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =400),
(select job_code from job where job_code = 85),
TO_DATE( '2-oct-1982','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Zack','Richmond',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =400),
(select job_code from job where job_code = 85),
TO_DATE( '2-jan-1963','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Ashland', 'Kedzie',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =400),
29
31. (select job_code from job where job_code = 85),
TO_DATE( '06-jul-1969','DD-MON-YYYY '), 'female'
);
/*end */
/*project manager*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Joel' , 'Jeremiah',
emp_ssn_seq.nextval, 60,
(select dept_id from department where dept_id =425),
(select job_code from job where job_code = 90),
TO_DATE( '20-oct-1958','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Zack','Isaiah',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =425),
(select job_code from job where job_code = 90),
TO_DATE( '13-oct-1966','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Ashland', 'Macnell',
emp_ssn_seq.nextval, 50,
(select dept_id from department where dept_id =425),
(select job_code from job where job_code = 90),
TO_DATE( '06-jul-1969','DD-MON-YYYY '), 'female'
);
/*end*/
/*network specialist*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Sam', 'Walteron',
emp_ssn_seq.nextval,50,
(select dept_id from department where dept_id =415),
(select job_code from job where job_code = 95),
TO_DATE( '14-apr-1951','DD-MON-YYYY '), 'male'
);
30
32. Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jacob', 'Henson',
emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =415),
(select job_code from job where job_code = 100),
TO_DATE( '13-jan-1970','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Lee', 'Chin',
emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =415),
(select job_code from job where job_code = 105),
TO_DATE( '09-sep-1984', 'DD-MON-YYYY '), 'male');
/*end*/
/*accounting and fianace */
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Rose', 'Henson',
emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =430),
(select job_code from job where job_code = 115),
TO_DATE( '13-jan-1970','DD-MON-YYYY '), 'female'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Jackie', 'Hopewell',
emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =430),
(select job_code from job where job_code = 120),
TO_DATE( '09-sep-1984', 'DD-MON-YYYY '), 'female');
/*end*/
/*test analyst*/
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Derick', 'Charles',
emp_ssn_seq.nextval, 40,
(select dept_id from department where dept_id =400),
(select job_code from job where job_code = 125),
31
33. TO_DATE( '25-july-1970','DD-MON-YYYY '), 'male'
);
Insert into employee (emp_id, first_name, last_name, ssn, emp_rate, dept_id, job_code,
dob, gender)
values (emp_emp_id_seq.nextval , 'Lou', 'Shih',
emp_ssn_seq.nextval, 30,
(select dept_id from department where dept_id =400),
(select job_code from job where job_code = 125),
TO_DATE( '04-jun-1989', 'DD-MON-YYYY '), 'female');
/*end*/
/* insert records of employees associated with project */
/* projct 900 */
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 1200
, (select emp_id from employee where emp_id = 34434)
, (select proj_num from project where proj_num = 900 ) );
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 900
, (select emp_id from employee where emp_id = 34304)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 900
,(select emp_id from employee where emp_id = 33914)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 900
, (select emp_id from employee where emp_id = 33784)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 890
32
34. , (select emp_id from employee where emp_id = 34174 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 890
, (select emp_id from employee where emp_id =34564 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 890
, (select emp_id from employee where emp_id = 35084)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 890
, (select emp_id from employee where emp_id =34954)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 890
, (select emp_id from employee where emp_id = 36514)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 989
, (select emp_id from employee where emp_id = 36384)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 1000
, (select emp_id from employee where emp_id = 30664 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 400
, (select emp_id from employee where emp_id = 30534 )
, (select proj_num from project where proj_num = 900));
33
35. insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 980
, (select emp_id from employee where emp_id = 31054)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 800
, (select emp_id from employee where emp_id = 31314 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 690
, (select emp_id from employee where emp_id = 33394 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 550
, (select emp_id from employee where emp_id = 33264 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 1200,
(select emp_id from employee where emp_id = 32224)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 980,
(select emp_id from employee where emp_id = 32094)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun -2008', 'dd-mon-yyyy'), 550
, (select emp_id from employee where emp_id = 32874 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 1200,
34
36. (select emp_id from employee where emp_id = 31704 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 980,
(select emp_id from employee where emp_id = 35994)
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 1200,
(select emp_id from employee where emp_id = 36124 )
, (select proj_num from project where proj_num = 900));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-jun-2008', 'dd-mon-yyyy'), 980,
(select emp_id from employee where emp_id = 36254 )
, (select proj_num from project where proj_num = 900));
/* project num 905 */
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 980
, (select emp_id from employee where emp_id = 35214)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 780
, (select emp_id from employee where emp_id = 36384)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 890
, (select emp_id from employee where emp_id = 34824)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 400
, (select emp_id from employee where emp_id = 34044)
, (select proj_num from project where proj_num = 55));
35
37. insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 400,
(select emp_id from employee where emp_id = 34174)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 500,
(select emp_id from employee where emp_id = 34434)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 800,
(select emp_id from employee where emp_id = 34304)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 789,
(select emp_id from employee where emp_id = 33784 )
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 789,
(select emp_id from employee where emp_id = 32224 )
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 890,
(select emp_id from employee where emp_id = 32484)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 900,
(select emp_id from employee where emp_id = 32744)
, (select proj_num from project where proj_num = 905));
36
38. insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 989,
(select emp_id from employee where emp_id = 30404)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'),900,
(select emp_id from employee where emp_id = 30924 )
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 1500,
(select emp_id from employee where emp_id = 31834)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 1400,
(select emp_id from employee where emp_id = 31444)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 699,
(select emp_id from employee where emp_id = 35994)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 850,
(select emp_id from employee where emp_id = 35864)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 90,
(select emp_id from employee where emp_id = 36124)
, (select proj_num from project where proj_num = 905));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 850,
(select emp_id from employee where emp_id = 36254)
, (select proj_num from project where proj_num = 905));
37
39. insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('06-dec-2009', 'dd-mon-yyyy'), 850,
(select emp_id from employee where emp_id = 33134)
, (select proj_num from project where proj_num = 905));
/*end of project 905 */
/* project 910 */
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 1800,
(select emp_id from employee where emp_id = 33654 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 1200,
(select emp_id from employee where emp_id = 33524 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 1340,
(select emp_id from employee where emp_id = 32354)
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 980,
(select emp_id from employee where emp_id = 33004)
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 1050,
(select emp_id from employee where emp_id = 32614 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours,
emp_id, proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 1300,
(select emp_id from employee where emp_id = 31184 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
38
40. values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 290,
(select emp_id from employee where emp_id = 30794)
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 800,
(select emp_id from employee where emp_id = 31964 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('01-feb-2011', 'dd-mon-yyyy'), 780,
(select emp_id from employee where emp_id = 31574)
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 550,
(select emp_id from employee where emp_id = 34694 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 650,
(select emp_id from employee where emp_id = 35734 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 890,
(select emp_id from employee where emp_id = 34434 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 900,
(select emp_id from employee where emp_id = 32224 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 900,
(select emp_id from employee where emp_id = 30404)
, (select proj_num from project where proj_num = 910));
39
41. insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 1200,
(select emp_id from employee where emp_id = 31834 )
, (select proj_num from project where proj_num = 910));
insert into ASSIGNMENT(Assignment_Num, Assign_Date, Assign_Hours, emp_id,
proj_num)
values ( assign_assign_num_seq.nextval, to_date('27-dec-2010', 'dd-mon-yyyy'), 550,
(select emp_id from employee where emp_id = 34174)
, (select proj_num from project where proj_num = 910));
/* update assign hours*/
update assignment
set assign_hours = 1200
where ASSIGNMENT_NUM = 5824
/*end sql*/
/*end*/
/* updates the cost for each employee based on their pay rate */
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5296 )
where emp_id = 35214
and Assignment_Num =5296 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5308 )
where emp_id = 36384
and Assignment_Num =5308 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5320)
where emp_id = 34824
and Assignment_Num =5320 ;
40
42. update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5344 )
where emp_id = 34174
and Assignment_Num =5344 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5356 )
where emp_id = 34434
and Assignment_Num =5356 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5368)
where emp_id = 34044
and Assignment_Num =5368 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5380)
where emp_id =33784
and Assignment_Num = 5380;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5392)
where emp_id = 34304
and Assignment_Num =5392 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5404)
where emp_id = 32224
and Assignment_Num =5404 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num =5416)
where emp_id = 32484
and Assignment_Num =5416 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5428)
where emp_id = 32744
41
43. and Assignment_Num = 5428 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5440)
where emp_id = 30404
and Assignment_Num = 5440 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5452)
where emp_id = 30924
and Assignment_Num = 5452 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5464)
where emp_id = 31834
and Assignment_Num = 5464;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5488)
where emp_id = 35994
and Assignment_Num = 5488;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5500)
where emp_id = 35864
and Assignment_Num = 5500;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5476 )
where emp_id = 31444
and Assignment_Num = 5476;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5512 )
where emp_id = 36124
and Assignment_Num = 5512;
42
44. update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5524 )
where emp_id = 36254
and Assignment_Num = 5524 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5536 )
where emp_id = 33134
and Assignment_Num = 5536;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5188 )
where emp_id = 33394
and Assignment_Num = 5188;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5200 )
where emp_id = 33264
and Assignment_Num = 5200;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5212)
where emp_id = 32224
and Assignment_Num = 5212;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5224 )
where emp_id = 32094
and Assignment_Num = 5224 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5236 )
where emp_id = 32874
and Assignment_Num = 5236;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5248 )
where emp_id = 31704
43
45. and Assignment_Num = 5248;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5260 )
where emp_id = 35994
and Assignment_Num = 5260 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5272)
where emp_id = 36124
and Assignment_Num = 5272;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5020)
where emp_id = 34434
and Assignment_Num = 5020;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5032 )
where emp_id = 34304
and Assignment_Num = 5032 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5044 )
where emp_id = 33914
and Assignment_Num = 5044 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5056 )
where emp_id = 33784
and Assignment_Num = 5056 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5068 )
where emp_id = 34174
and Assignment_Num = 5068;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5080)
where emp_id = 34564
and Assignment_Num = 5080 ;
44
46. update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5092 )
where emp_id = 35084
and Assignment_Num = 5092;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5104 )
where emp_id = 34954
and Assignment_Num = 5104 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5116 )
where emp_id = 36514
and Assignment_Num = 5116;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5128 )
where emp_id = 36384
and Assignment_Num = 5128 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5140 )
where emp_id = 30664
and Assignment_Num = 5140 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5152)
where emp_id = 30534
and Assignment_Num = 5152;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5164 )
where emp_id = 31054
and Assignment_Num = 5164 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5176 )
where emp_id = 31314
and Assignment_Num = 5176;
45
47. update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 91608)
where emp_id = 36254
and Assignment_Num = 91608;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5284 )
where emp_id = 36254
and Assignment_Num = 5284 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5608 )
where emp_id = 33654
and Assignment_Num = 5608;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5620 )
where emp_id = 33524
and Assignment_Num = 5620;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5632)
where emp_id = 32354
and Assignment_Num = 5632 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5644 )
where emp_id = 33004
and Assignment_Num = 5644 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5656)
where emp_id = 31184
and Assignment_Num = 5656;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5680 )
where emp_id = 30794
and Assignment_Num = 5680;
46
48. update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5668)
where emp_id = 32614
and Assignment_Num = 5668 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5692 )
where emp_id = 31964
and Assignment_Num = 5692 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5704 )
where emp_id = 31574
and Assignment_Num = 5704 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5740 )
where emp_id = 34694
and Assignment_Num = 5740;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5752)
where emp_id = 35734
and Assignment_Num = 5752 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5764 )
where emp_id = 34434
and Assignment_Num = 5764 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5776 )
where emp_id = 32224
and Assignment_Num = 5776;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5788 )
where emp_id = 30404
and Assignment_Num = 5788 ;
update assignment
47
49. set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5812 )
where emp_id = 31834
and Assignment_Num = 5812 ;
update assignment
set cost = (select e.emp_rate * a.assign_hours from employee e inner join assignment a
on e.emp_id = a.emp_id where a.Assignment_Num = 5824)
where emp_id = 34174
and Assignment_Num = 5824;
/*end*/
/* inserts the record for employee contact information */
insert into contact (contact_id, emp_id, address, city, h_state, phone_home, phone_work,
email_office)
values (con_contact_id_seq.nextval,
( select emp_id from employee where emp_id = 35474), '8080 W Maddison', 'City
Heights', 'NJ', 2029091840, 82500920, 'ray.rich@sunlife.com');
insert into contact (contact_id, emp_id, address, city, h_state, phone_home, phone_work,
email_office)
values (con_contact_id_seq.nextval,
( select emp_id from employee where emp_id = 30794), '909 E Hudson', 'New York
City', 'NY', 2098908860, 82500922, 'zach.rich@sunlife.com') ;
insert into contact (contact_id, emp_id, address, apt_num, city, h_state, phone_home,
phone_work, email_office)
values (con_contact_id_seq.nextval,
( select emp_id from employee where emp_id = 34434), '4040 E Fifth Ave', '18GC',
'New York City', 'NY', 2013499292, 82500924, 'ashland.kediz@sunlife.com');
insert into contact (contact_id, emp_id, address, apt_num, city, h_state, phone_home,
phone_work, email_office)
values (con_contact_id_seq.nextval,
( select emp_id from employee where emp_id = 30404), '1900 S Lake Pine Dr', '2d',
'New England', 'CT', 2420017540, 82500923, 'derick.charl@sunlife.com');
insert into contact (contact_id, emp_id, address, apt_num, city, h_state, phone_home,
phone_work, email_office)
values (con_contact_id_seq.nextval,
( select emp_id from employee where emp_id = 34174), '1200 S brodway Dr', '4c',
'New bedford Park', 'CT', 2123988019, 82500926, 'lou.shi@sunlife.com');
48
50. Database Snappshot
The log file could not be captured with a web browser. The following captured pictures
reprsents the database state.
Figure 1 described issued command describes table structure for Department, Project and
Employee. The describe isssued command in figure 2 describes the table structures for
Job, Contact and Assiignment.
49
63. Deliverable 5 - SQL Queries
/* Show me name of employess whose job code is 65 */
SELECT first_name, last_name, job_code
from employee
where job_code= '65';
First_Name Last_Name Job_Code
Sanford Brown 65
Vonda Ikenna 65
Celina Tobi 65
Isabella Clinton 65
Table 8
/* Show me the total number of employess for different job codes */
SELECT job_code, count (*) as Total_number
from employee
Group by job_code;
JOB_CODE TOTAL_NUMBER
115 1
125 2
70 3
135 2
105 1
60 4
50 3
45 2
145 1
140 2
85 3
130 2
65 4
55 4
62
64. 95 1
90 3
100 1
120 1
75 4
80 4
Table 9
/* Show me the lowest rate for job code 65 */
select min(emp_rate) "Lowest Rate"
from employee
where job_code= '65'
group by job_code;
Lowest Rate
30
Table 10
/* Show me the name of employees with highest rate . List them by their first name*/
select first_name , last_name, emp_rate AS Lowest_emp_rate
from employee
where
emp_rate =
(select min(emp_rate)
from employee )
order by first_name;
FIRST_NAME LAST_NAME LOWEST_EMP_RATE
Brenda Bell 30
Celina Tobi 30
Deng Alian 30
Jackie Hopewell 30
Jerry Springfield 30
Lee Chin 30
63
65. Lou Shih 30
Table 11
/* subquery, Show the list of employees whose emp rate is greater than average rate */
select initcap(first_name) as FIRST_NAME, initcap (last_name) as LAST_NAME,
initcap(gender) as GENDER, emp_rate
from employee
where emp_rate > ( select avg(emp_rate) from employee);
FIRST_NAME LAST_NAME GENDER EMP_RATE
Sanford Brown Male 50
Jaqueline King Female 50
Michael Stevens Male 50
Carol Washington Female 50
Cherri Keys Female 50
Carlos Winworth Male 50
Jonas Lake Male 50
Addie Jude Female 50
Adams Wade Male 50
Robert Lopez Male 50
Ray Richmond Male 50
Zack Richmond Male 50
Ashland Kedzie Female 50
Joel Jeremiah Male 60
Zack Isaiah Male 50
Ashland Macnell Female 50
Sam Walteron Male 50
Sunny Mccook Male 50
Mariah Johnson Female 50
Table 12
64
66. /* Show the list of the employees who are working on the project assigned in the past 6
months */
Select e.first_name,e.last_name , a.assign_date, assignment_num
from employee e, assignment a
where
e.emp_id=a.emp_id
and
assign_date > (add_months(sysdate, -6))
FIRST_NAME LAST_NAME ASSIGN_DATE ASSIGNMENT_NUM
Joel Roland 01-FEB-11 5680
Marxwall Luther 01-FEB-11 5656
Jessica Andy 01-FEB-11 5704
Tyron Banks 01-FEB-11 5692
Ruth Baker 01-FEB-11 5632
Isabella Clinton 01-FEB-11 5668
Celina Tobi 01-FEB-11 5644
Table 13
/* Joining Three Tables.Show the name of employee , their ID, and project description
whose projects are overdue today */
select emp_id, e.first_name, proj_name, p.due_date
from employee e JOIN assignment a
using(emp_id)
JOIN
project p
using (proj_num)
where
due_date< sysdate
65
67. EMP_ID FIRST_NAME PROJ_NAME DUE_DATE EMP_ID
32744 Sanford St Paul College Web System 02-FEB-11 32744
Development
32874 Vonda New York Ticket Corp 09-SEP-10 32874
Payment System
33134 Brenda St Paul College Web System 02-FEB-11 33134
Development
33264 Jaqueline New York Ticket Corp 09-SEP-10 33264
Payment System
33394 Roland New York Ticket Corp 09-SEP-10 33394
Payment System
33784 Rebeca St Paul College Web System 02-FEB-11 33784
Development
33784 Rebeca New York Ticket Corp 09-SEP-10 33784
Payment System
33914 Cherri New York Ticket Corp 09-SEP-10 33914
Payment System
34044 Jerry St Paul College Web System 02-FEB-11 34044
Development
34174 Carlos St Paul College Web System 02-FEB-11 34174
Development
34174 Carlos New York Ticket Corp 09-SEP-10 34174
Payment System
34304 Patrick St Paul College Web System 02-FEB-11 34304
Development
34304 Patrick New York Ticket Corp 09-SEP-10 34304
Payment System
34434 Jonas St Paul College Web System 02-FEB-11 34434
Development
34434 Jonas New York Ticket Corp 09-SEP-10 34434
66
68. Payment System
34564 Addie New York Ticket Corp 09-SEP-10 34564
Payment System
34824 Robert St Paul College Web System 02-FEB-11 34824
Development
34954 Ray New York Ticket Corp 09-SEP-10 34954
Payment System
35084 Zack New York Ticket Corp 09-SEP-10 35084
Payment System
35214 Ashland St Paul College Web System 02-FEB-11 35214
Development
35864 Jacob St Paul College Web System 02-FEB-11 35864
Development
35994 Lee St Paul College Web System 02-FEB-11 35994
Development
35994 Lee New York Ticket Corp 09-SEP-10 35994
Payment System
36124 Rose St Paul College Web System 02-FEB-11 36124
Development
36124 Rose New York Ticket Corp 09-SEP-10 36124
Payment System
36254 Jackie St Paul College Web System 02-FEB-11 36254
Development
36254 Jackie New York Ticket Corp 09-SEP-10 36254
Payment System
36384 Derick St Paul College Web System 02-FEB-11 36384
Development
36384 Derick New York Ticket Corp 09-SEP-10 36384
Payment System
30404 Sunny St Paul College Web System 02-FEB-11 30404
Development
30534 Mariah New York Ticket Corp 09-SEP-10 30534
Payment System
67
69. 30664 James New York Ticket Corp 09-SEP-10 30664
Payment System
30924 Susan St Paul College Web System 02-FEB-11 30924
Development
31054 Peter New York Ticket Corp 09-SEP-10 31054
Payment System
31314 Fox New York Ticket Corp 09-SEP-10 31314
Payment System
31444 Deng St Paul College Web System 02-FEB-11 31444
Development
31704 Shirly New York Ticket Corp 09-SEP-10 31704
Payment System
31834 Mathew St Paul College Web System 02-FEB-11 31834
Development
32094 Donna New York Ticket Corp 09-SEP-10 32094
Payment System
32224 Linda St Paul College Web System 02-FEB-11 32224
Development
32224 Linda New York Ticket Corp 09-SEP-10 32224
Payment System
32484 Kevin St Paul College Web System 02-FEB-11 32484
Development
36514 Lou New York Ticket Corp 09-SEP-10 36514
Payment System
Table 14
68
70. Deliverable 6 -Database Maintenance Scripts
/* create the dependent table*/
CREATE TABLE DEPENDENT
(
Depend_Num Number (5),
First_Name VARCHAR2(50),
Last_Name VARCHAR2(50),
Dep_Dob DATE ,
Emp_id NUMBER,
Depend_Type varchar2(20)
);
/* create the sequence for the primary key for depend_num*/
create sequence depend_depend_num_seq
start with 065000
increment by 13
Nocycle;
/* creates the constraints assiocated with dependent table */
Alter table DEPENDENT
modify (first_name CONSTRAINT depend_first_name_nn not null)
modify (last_name CONSTRAINT depend_last_name_nn not null)
modify (dep_DOB CONSTRAINT depend_dep_dob_mn not null )
modify (emp_id CONSTRAINT depend_Emp_id_nn NOT NULL)
modify (Depend_Type CONSTRAINT depend_Depend_Type_nn NOT
NULL);
Alter table DEPENDENT
add constraint depend_Depend_num_pk PRIMARY KEY (Depend_Num);
Alter table DEPENDENT
add CONSTRAINT Depend_Emp_id_fk FOREIGN KEY(Emp_id) REFERENCES
EMPLOYEE(Emp_id);
69
71. DML Statements
insert into dependent (depend_num, first_name, last_name, dep_dob, emp_id,
Depend_Type )
values ( depend_depend_num_seq.nextval, 'Nancy', 'Brown', to_date('18-oct-1969',
'dd-mon-yyyy'),
(select emp.emp_id from employee emp where emp.emp_id =
32744),
'Wife'
);
insert into dependent (depend_num, first_name, last_name, dep_dob, emp_id,
Depend_Type )
values ( depend_depend_num_seq.nextval, 'John', 'Ikenna', to_date('08-dec-1985',
'dd-mon-yyyy'),
(select emp.emp_id from employee emp where emp.emp_id =
32874),
'Husband'
);
insert into dependent (depend_num, first_name, last_name, dep_dob, emp_id,
Depend_Type )
values ( depend_depend_num_seq.nextval, 'Greg', 'Tobi', to_date('12-mar-1985',
'dd-mon-yyyy'),
(select emp.emp_id from employee emp where emp.emp_id =
33004),
'Partner'
);
insert into dependent (depend_num, first_name, last_name, dep_dob, emp_id,
Depend_Type )
values ( depend_depend_num_seq.nextval, 'Mariah', 'Winfield', to_date('09-apr-
1969', 'dd-mon-yyyy'),
(select emp.emp_id from employee emp where emp.emp_id =
33134),
'Partner'
);
insert into dependent (depend_num, first_name, last_name, dep_dob, emp_id,
Depend_Type )
values ( depend_depend_num_seq.nextval, 'luther', 'king', to_date('09-apr-1988',
'dd-mon-yyyy'),
(select emp.emp_id from employee emp where emp.emp_id =
33394),
'Partner'
);
70