Part I This part is worth 6 points. Create the following tables in your Oracle account: CREATE
TABLE PlaneN (Pnum char(3) primary key, Feature varchar2(20), Ptype varchar2(15));
CREATE TABLE PilotN (Eid char(3) primary key, Ename varchar(10), Salary number(7,2),
Mid char(3), foreign key (Mid) references PilotN); CREATE TABLE FlightN (Fnum char(4)
primary key, Fdate date, Duration number(2), Pnum char(3), foreign key (Pnum) references
PlaneN); CREATE TABLE Implements (Fnum char(4), Eid char(3), primary key( Fnum, Eid),
foreign key (Fnum) references FlightN, foreign key (Eid) references PilotN); Prepare a file and
execute the statements from the file. Use describe command to demonstrate your tables are
created. Part II is worth 20 points Insert the following data into created tables. 1. [2] Use the
INSERT SQL statements to insert data into PlaneN table. Put all your INSERT statements in a
file and execute the statements from the file.
2. [18] Use SQLLOADER utility to insert data into three other tables. Insert the following data
into PilotN table: Insert the following data into FlightN table:
Insert the following data into Implements table: FNUM EID \begin{tabular}{ll} \hline f01 & e02
\\ f01 & e05 \\ f02 & e02 \\ f03 & e02 \\ f03 & e03 \\ f04 & e05 \\ f05 & e05 \\ f05 & e06 \\ f06 &
e08 \\ f06 & e09 \\ f07 & e11 \\ f07 & e12 \\ f08 & e08 \\ f08 & e10 \\ f09 & e11 \\ f10 & e12 \\
f11 & e02 \\ f11 & e06 \\ f12 & e03 \\ f12 & e05 \\ f13 & e06 \\ f13 & e08 \\ f14 & e11 \\ f15 &
e12 \end{tabular} Use SELECT command to show the content of your tables. Part III is worth 74
points. Develop SQL statements for the following queries and execute them on Oracle 11g
hosted by School of ITEC Teaching Server: 1. [10] List names of pilots who implemented flights
on the planes of 'Commuter' type before '01-SEP-22'. 2. [8] Find names of pilots who
implemented more than one flight and have salary less than 40,000 . 3. [6] Find numbers and
features of planes which were not used in any flight so far.
4. [8] For each plane display its plane number, feature, and the total number of hours it spent in
the air. If a plane was not used at all, leave the total number of hours blank (don't show anything
in this column) for the plane. 5. [12] Find the name of the pilot(s) who implemented the longest
flight. 6. [10] Find plane types on which pilots whose manager is Green implemented flights. 7.
[8] Find employee IDs and names of pilots who implemented flights on planes of both types
'Commuter' and 'Normal' 8. [12] Display all pilots (their IDs and names) and the words "Higher
than average" if the pilot implemented more than the average number of flights per pilot or the
words "Lower than average" if the pilot implemented less than the average number of flights per
pilot. For the column holding the words "Higher than average" or "Lower than average" make a
header Performance. Put all your queries in a file and execute the queries from the file. Submit:
1. Cover page indicatin.
Part I This part is worth 6 points. Create the following tables in yo.pdf
1. Part I This part is worth 6 points. Create the following tables in your Oracle account: CREATE
TABLE PlaneN (Pnum char(3) primary key, Feature varchar2(20), Ptype varchar2(15));
CREATE TABLE PilotN (Eid char(3) primary key, Ename varchar(10), Salary number(7,2),
Mid char(3), foreign key (Mid) references PilotN); CREATE TABLE FlightN (Fnum char(4)
primary key, Fdate date, Duration number(2), Pnum char(3), foreign key (Pnum) references
PlaneN); CREATE TABLE Implements (Fnum char(4), Eid char(3), primary key( Fnum, Eid),
foreign key (Fnum) references FlightN, foreign key (Eid) references PilotN); Prepare a file and
execute the statements from the file. Use describe command to demonstrate your tables are
created. Part II is worth 20 points Insert the following data into created tables. 1. [2] Use the
INSERT SQL statements to insert data into PlaneN table. Put all your INSERT statements in a
file and execute the statements from the file.
2. [18] Use SQLLOADER utility to insert data into three other tables. Insert the following data
into PilotN table: Insert the following data into FlightN table:
Insert the following data into Implements table: FNUM EID begin{tabular}{ll} hline f01 & e02
f01 & e05 f02 & e02 f03 & e02 f03 & e03 f04 & e05 f05 & e05 f05 & e06 f06 &
e08 f06 & e09 f07 & e11 f07 & e12 f08 & e08 f08 & e10 f09 & e11 f10 & e12
f11 & e02 f11 & e06 f12 & e03 f12 & e05 f13 & e06 f13 & e08 f14 & e11 f15 &
e12 end{tabular} Use SELECT command to show the content of your tables. Part III is worth 74
points. Develop SQL statements for the following queries and execute them on Oracle 11g
hosted by School of ITEC Teaching Server: 1. [10] List names of pilots who implemented flights
on the planes of 'Commuter' type before '01-SEP-22'. 2. [8] Find names of pilots who
implemented more than one flight and have salary less than 40,000 . 3. [6] Find numbers and
features of planes which were not used in any flight so far.
4. [8] For each plane display its plane number, feature, and the total number of hours it spent in
the air. If a plane was not used at all, leave the total number of hours blank (don't show anything
in this column) for the plane. 5. [12] Find the name of the pilot(s) who implemented the longest
flight. 6. [10] Find plane types on which pilots whose manager is Green implemented flights. 7.
[8] Find employee IDs and names of pilots who implemented flights on planes of both types
'Commuter' and 'Normal' 8. [12] Display all pilots (their IDs and names) and the words "Higher
than average" if the pilot implemented more than the average number of flights per pilot or the
words "Lower than average" if the pilot implemented less than the average number of flights per
pilot. For the column holding the words "Higher than average" or "Lower than average" make a
header Performance. Put all your queries in a file and execute the queries from the file. Submit:
2. 1. Cover page indicating your last name, first name, student number, course code and section. 2.
Printouts of your recorded sessions on Oracle 11g hosted by SIT Teaching server. You are to
record the sessions using SQLPlus spool command. The printout should demonstrate execution
of CREATE TABLE statements from the file, data insertion using INSERT SQL statements, and
execution of the queries from the file (the results of the execution of your SELECT statements).
Do not include all your sessions, submit only the last sessions for each part of the assignment. 3.
To show the SQL statements in the spool files, put SET ECHO ON command in the first line of
each file with SQL statements. 4. Printouts of the file(s) created by Linux script command
demonstrating your work with Oracle SQL*Loader utility. 5. The instruction how to record a
session using script command is posted on our class website. 6. Printout of the file containing
INSERT statements. 7. Printout of the file containing SELECT statements. 8. Printout of the files
with data and control information for SQL*LOADER utility. You may put the data within a
control file or prepare two separate files for each table. 9. Make sure that your printouts are
legible: contain complete SQL statements and results of their execution, don't have extra
characters between statements and reserved words. 10.Submit the hard copy of assignment # 2
to assignment drop-box # 7 on the third floor of DB. 11. Do not use host SQL*Plus command
for Part U of assignment # 2.