SlideShare a Scribd company logo
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 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.

More Related Content

PDF
MICRO PROJECT 22319 DMS
DOCX
Cis 336 ilab 5 of 7
DOC
Oracle 11g
DOCX
CIS/336 ilab 5 of 7
PDF
Oracle 11G Development Training noida Delhi NCR
PDF
48742447 11g-sql-fundamentals-ii-additional-practices-and-solutions
PDF
Oracle11gdevtrainingindelhincr
PDF
Pl lab solution
MICRO PROJECT 22319 DMS
Cis 336 ilab 5 of 7
Oracle 11g
CIS/336 ilab 5 of 7
Oracle 11G Development Training noida Delhi NCR
48742447 11g-sql-fundamentals-ii-additional-practices-and-solutions
Oracle11gdevtrainingindelhincr
Pl lab solution

Similar to Part I This part is worth 6 points. Create the following tables in yo.pdf (20)

DOCX
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
DOC
Cis336 week 5 i lab 5
DOC
Cis336 week 5 i lab 5
DOC
Cis336 week 5 i lab 5
DOC
Cis336 week 5 i lab 5
PDF
PDF
Sql1 vol2
DOCX
Cis 336 cis336 week 5 i lab 5 devry university
PDF
CIS 336 Final Exam 2 (Devry)
PDF
CIS 336 Final Exam 2 (Devry)s
PPT
Database Management systems lecture notes
PDF
Cis 336 final exam 2
PDF
CIS 336 Final Exam 2 (Devry)p
PDF
Cis 336 final exam 2
PDF
Assignment2
DOCX
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DOCX
DBMS file Ayush.docxdede4rfr5gf45trghtyhty
DOCX
DBMS file.docnythjyuyuhik,,lo,ooilllllllll0plx
PDF
Oracle database 12c sql worshop 1 student guide vol 2
PDF
SQL.pdf
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
Sql1 vol2
Cis 336 cis336 week 5 i lab 5 devry university
CIS 336 Final Exam 2 (Devry)
CIS 336 Final Exam 2 (Devry)s
Database Management systems lecture notes
Cis 336 final exam 2
CIS 336 Final Exam 2 (Devry)p
Cis 336 final exam 2
Assignment2
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DBMS file Ayush.docxdede4rfr5gf45trghtyhty
DBMS file.docnythjyuyuhik,,lo,ooilllllllll0plx
Oracle database 12c sql worshop 1 student guide vol 2
SQL.pdf
Ad

More from ambritmobiles (20)

PDF
Presented below are three receivable transactions. Journalize these u.pdf
PDF
Premium Fender uses a standard cost system and provide the tolowing h.pdf
PDF
Preparation 1. Find i(t) and Vc(t) ( calculate by hand ), R=6, C=0.12.pdf
PDF
Preguntas informativas de evaluaci�n de salud de ATI Harold Steven.pdf
PDF
Presanted beloware the firanoal statamonts of Whispering Winds Compan.pdf
PDF
Practice This cartilage is tough and functions to cushion and add st.pdf
PDF
Pre-Lab questions (to be turned in before a b begins) 1. Distinguish.pdf
PDF
Presented below are four segments that have been identified by Novak .pdf
PDF
PRE-LAB EXERCISES 161 Key Termm corend in fretab fermin ifi io.tim It.pdf
PDF
Prepare the journal entries for Brandon Corp. for the following dat.pdf
PDF
Pregunta 1 1 pto Las firmas con las que una empresa se asocia p.pdf
PDF
Pregunta de lectura 2 (10 puntos) Lee el siguiente texto y con.pdf
PDF
PREGUNTA 1 Seleccione cinco de los siguientes casos y determin.pdf
PDF
Prepare the adjusting entry for each item assuming a December 31, 202.pdf
PDF
Practice Map A 1. Label each contour line with the proper elevation u.pdf
PDF
Part BTying plutonic igneous textures to their ternary phase diagr.pdf
PDF
Part A. Use data charity.RData, collected by Franses and Paap (2001),.pdf
PDF
PART A Tautologies, Contradictions, and Contingent Statements Use tr.pdf
PDF
Part 1. Pedigrees For the pedigrees below, look at each pedigree, cir.pdf
PDF
Part 1 of 3 Points 0.25 of 1 celebrities Do the data appear to be f.pdf
Presented below are three receivable transactions. Journalize these u.pdf
Premium Fender uses a standard cost system and provide the tolowing h.pdf
Preparation 1. Find i(t) and Vc(t) ( calculate by hand ), R=6, C=0.12.pdf
Preguntas informativas de evaluaci�n de salud de ATI Harold Steven.pdf
Presanted beloware the firanoal statamonts of Whispering Winds Compan.pdf
Practice This cartilage is tough and functions to cushion and add st.pdf
Pre-Lab questions (to be turned in before a b begins) 1. Distinguish.pdf
Presented below are four segments that have been identified by Novak .pdf
PRE-LAB EXERCISES 161 Key Termm corend in fretab fermin ifi io.tim It.pdf
Prepare the journal entries for Brandon Corp. for the following dat.pdf
Pregunta 1 1 pto Las firmas con las que una empresa se asocia p.pdf
Pregunta de lectura 2 (10 puntos) Lee el siguiente texto y con.pdf
PREGUNTA 1 Seleccione cinco de los siguientes casos y determin.pdf
Prepare the adjusting entry for each item assuming a December 31, 202.pdf
Practice Map A 1. Label each contour line with the proper elevation u.pdf
Part BTying plutonic igneous textures to their ternary phase diagr.pdf
Part A. Use data charity.RData, collected by Franses and Paap (2001),.pdf
PART A Tautologies, Contradictions, and Contingent Statements Use tr.pdf
Part 1. Pedigrees For the pedigrees below, look at each pedigree, cir.pdf
Part 1 of 3 Points 0.25 of 1 celebrities Do the data appear to be f.pdf
Ad

Recently uploaded (20)

PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
International_Financial_Reporting_Standa.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
Trump Administration's workforce development strategy
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
Complications of Minimal Access-Surgery.pdf
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Virtual and Augmented Reality in Current Scenario
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Hazard Identification & Risk Assessment .pdf
Introduction to pro and eukaryotes and differences.pptx
My India Quiz Book_20210205121199924.pdf
Weekly quiz Compilation Jan -July 25.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
What if we spent less time fighting change, and more time building what’s rig...
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
International_Financial_Reporting_Standa.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
Trump Administration's workforce development strategy
IGGE1 Understanding the Self1234567891011
Share_Module_2_Power_conflict_and_negotiation.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Complications of Minimal Access-Surgery.pdf
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Virtual and Augmented Reality in Current Scenario

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.