SlideShare a Scribd company logo
1 of 2
Download to read offline
sql code for this question below
Portland Airports Ltd would like a database to be implemented to track information about
particular flights. Flights have no. of passengers, flight number, airline, day of the week, time
and duration. The status i.e. whether the flight is onTime, cancelled or delayed is also required.
All fights use an aircraft and arrive or depart from an airport. By definition, pilots are those
employees who are certified on at least one aircraft. An aircraft can be used for any flight
provided it has sufficient range. Pilots can pllot any flight provided they are certified on an
aircraft with sufficient range and maximum capacity. Employee's personal information and
salary are stored. Table 1 - Aircraft Records to be entered Table 2 -Flight Records to be entered
Table 3: Emplovee information Task 1 - Implement the ERD shown above. (45 marks) a. Write
create and use statements to create the database portlandAirports+ID# [2] b. Create Table
Statements [12] (Ensure auto number is used for the Shift table) i. Using appropriate Foreign
Keys [ 4 ] ii. Ensure that the mandatory participation is implemented [2] b. Create Table
Statements (Ensure auto number is used for the Shift table) i. Using appropriate Foreign Keys ii.
Ensure that the mandatory participation is implemented iii. Using correct data types c. Create and
name the following constraints i. Ensure that email is unique ii. Ensure that the maxCapacity
field has a default value of 100 . d. Modify the respective table to add a minimum and maximum
range field to Aircraft. e. Ensure range values are checked to fall within the particular ranges f.
Delete the name field from the employee table and add first_name, Middle Initial and last name
fields. g. Ensure that the salary field can accept 12 digits of precision with a scale of 2 h. Add the
status field to flight and ensure it can only accept the values - cancelled, delaye or OnTime,
default to OnTime i. Delete the cargo field from the flight table add the distance Task 2.-
Demonstrate interacting with data ( 55 marks) a. Develop appropriate full and partial insert
statements for each table (Information in Tables 1 and 2 should be inserted as well as other
information given Ensure values are entered in your added columns) b. Add 1 additional records
for all tables except the aircraft table c. All Caribbean Airline and Jet Blue flights are delayed. d.
Give the first, middle initial, last name, email of all cmployees who are not pilots e. Display the
flight number, number of passengers, departure time, arrival time, airline, day, time for all flights
that is arriving at the Norman Manley or Donald Sangster airpor Sort the records by airline
within arriving airport f. Display all flights that are departing Norman Manley, Toronto or Miami
Airports during weekdays (Monday to Thursday) where the second character in the name of the
airline is an ' e '. g. Delete one of the records entered h. Display all aircraft that can carry 250
passengers over 9000 miles i. Display each employee's full name (one string), full address (one
string), monthly salary in JMDS (assume your own rate), Income Tax ( 25% of salary in excess
of $1.5 million) And Net Income (Amount after tax is deducted (All values are to be displayed
JMDS. j. What is the total salary the airport pays to male and to female pilots? k. How many
employees does the company employ? 1. What is the average range of an aircraft for each
manufacturer having a maximum capacity excecding 100 passengers? m . What is the minimum
salary paid to a female employce?
sql code  for this question below  Portland Airports Ltd would like a.pdf

More Related Content

Similar to sql code for this question below Portland Airports Ltd would like a.pdf

simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.comsimple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
hk2208820
 
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdfFedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
alukkasprince
 
Part I This part is worth 6 points. Create the following tables in yo.pdf
 Part I This part is worth 6 points. Create the following tables in yo.pdf Part I This part is worth 6 points. Create the following tables in yo.pdf
Part I This part is worth 6 points. Create the following tables in yo.pdf
ambritmobiles
 
Comp 255 Project F2009
Comp 255 Project F2009Comp 255 Project F2009
Comp 255 Project F2009
guest008f82
 
JAVA The file being read is called flightdatatxt please in.pdf
JAVA The file being read is called flightdatatxt please in.pdfJAVA The file being read is called flightdatatxt please in.pdf
JAVA The file being read is called flightdatatxt please in.pdf
adinathassociates
 
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docxECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
jack60216
 
#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx
mayank272369
 
Create a Flight class that uses the Plane and Time class. This class.pdf
Create a Flight class that uses the Plane and Time class. This class.pdfCreate a Flight class that uses the Plane and Time class. This class.pdf
Create a Flight class that uses the Plane and Time class. This class.pdf
daniamantileonismc36
 
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docxSpring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
rafbolet0
 

Similar to sql code for this question below Portland Airports Ltd would like a.pdf (20)

Standoutfromthe crowds
Standoutfromthe crowdsStandoutfromthe crowds
Standoutfromthe crowds
 
Course project for CEE 4674
Course project for CEE 4674Course project for CEE 4674
Course project for CEE 4674
 
simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.comsimple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
simple airline database project..By Amarulla khan, :- amarullakhan8@gmail.com
 
big data slides.pptx
big data slides.pptxbig data slides.pptx
big data slides.pptx
 
Airline Database Design
Airline Database DesignAirline Database Design
Airline Database Design
 
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdfFedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
FedExPlanes7.txt1 medical 111 Boeing767 120000 London 3 packages.pdf
 
2015 Flight Delay/Cancellation Analysis
2015 Flight Delay/Cancellation Analysis2015 Flight Delay/Cancellation Analysis
2015 Flight Delay/Cancellation Analysis
 
Amadeus PPT
Amadeus PPTAmadeus PPT
Amadeus PPT
 
Is Low Cost Carrier Profitable -Ryan article - Issue No. 2
Is Low Cost Carrier Profitable -Ryan article - Issue No. 2Is Low Cost Carrier Profitable -Ryan article - Issue No. 2
Is Low Cost Carrier Profitable -Ryan article - Issue No. 2
 
Part I This part is worth 6 points. Create the following tables in yo.pdf
 Part I This part is worth 6 points. Create the following tables in yo.pdf Part I This part is worth 6 points. Create the following tables in yo.pdf
Part I This part is worth 6 points. Create the following tables in yo.pdf
 
Comp 255 Project F2009
Comp 255 Project F2009Comp 255 Project F2009
Comp 255 Project F2009
 
JAVA The file being read is called flightdatatxt please in.pdf
JAVA The file being read is called flightdatatxt please in.pdfJAVA The file being read is called flightdatatxt please in.pdf
JAVA The file being read is called flightdatatxt please in.pdf
 
Predict Price of Airline Tickets.pptx
Predict Price of Airline Tickets.pptxPredict Price of Airline Tickets.pptx
Predict Price of Airline Tickets.pptx
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015
 
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docxECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
ECS 40 Program #3 (50 points, my time 1.5 hours) Spring 2015 .docx
 
#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx
 
Airline Economics - Planning And Key Performance Indicators Practical Guide F...
Airline Economics - Planning And Key Performance Indicators Practical Guide F...Airline Economics - Planning And Key Performance Indicators Practical Guide F...
Airline Economics - Planning And Key Performance Indicators Practical Guide F...
 
Cs practical file
Cs practical fileCs practical file
Cs practical file
 
Create a Flight class that uses the Plane and Time class. This class.pdf
Create a Flight class that uses the Plane and Time class. This class.pdfCreate a Flight class that uses the Plane and Time class. This class.pdf
Create a Flight class that uses the Plane and Time class. This class.pdf
 
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docxSpring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
 

More from dawarhosy

More from dawarhosy (20)

Stewart Parnell- the former CEO of the now-bankrupt Peanut Corporation.pdf
Stewart Parnell- the former CEO of the now-bankrupt Peanut Corporation.pdfStewart Parnell- the former CEO of the now-bankrupt Peanut Corporation.pdf
Stewart Parnell- the former CEO of the now-bankrupt Peanut Corporation.pdf
 
Steric effect refers to proteins being packed together so tightly that.pdf
Steric effect refers to proteins being packed together so tightly that.pdfSteric effect refers to proteins being packed together so tightly that.pdf
Steric effect refers to proteins being packed together so tightly that.pdf
 
Station C Marchantia- or liverwort- is thought to be descended from la.pdf
Station C Marchantia- or liverwort- is thought to be descended from la.pdfStation C Marchantia- or liverwort- is thought to be descended from la.pdf
Station C Marchantia- or liverwort- is thought to be descended from la.pdf
 
Steganography is used to hide malware and botnets on publicly availabl.pdf
Steganography is used to hide malware and botnets on publicly availabl.pdfSteganography is used to hide malware and botnets on publicly availabl.pdf
Steganography is used to hide malware and botnets on publicly availabl.pdf
 
Statistical Independence and Dependence Dependent Events (1 of 2 ) Wha.pdf
Statistical Independence and Dependence Dependent Events (1 of 2 ) Wha.pdfStatistical Independence and Dependence Dependent Events (1 of 2 ) Wha.pdf
Statistical Independence and Dependence Dependent Events (1 of 2 ) Wha.pdf
 
Station B Mycorrhizae are fungi that have formed a mutualistic relatio.pdf
Station B Mycorrhizae are fungi that have formed a mutualistic relatio.pdfStation B Mycorrhizae are fungi that have formed a mutualistic relatio.pdf
Station B Mycorrhizae are fungi that have formed a mutualistic relatio.pdf
 
statements mostly relates to COSO- represents the accounting professio.pdf
statements mostly relates to COSO- represents the accounting professio.pdfstatements mostly relates to COSO- represents the accounting professio.pdf
statements mostly relates to COSO- represents the accounting professio.pdf
 
Station D Selaginella belongs to the lycopod plant group- Lycopods gro.pdf
Station D Selaginella belongs to the lycopod plant group- Lycopods gro.pdfStation D Selaginella belongs to the lycopod plant group- Lycopods gro.pdf
Station D Selaginella belongs to the lycopod plant group- Lycopods gro.pdf
 
Statement 1- Hydrogen bonds are responsible for specific base-pair for.pdf
Statement 1- Hydrogen bonds are responsible for specific base-pair for.pdfStatement 1- Hydrogen bonds are responsible for specific base-pair for.pdf
Statement 1- Hydrogen bonds are responsible for specific base-pair for.pdf
 
State what enzyme the pesticide DDT targets and explain why it kills i.pdf
State what enzyme the pesticide DDT targets and explain why it kills i.pdfState what enzyme the pesticide DDT targets and explain why it kills i.pdf
State what enzyme the pesticide DDT targets and explain why it kills i.pdf
 
State the advantages and limitations of using microforms- In what ways.pdf
State the advantages and limitations of using microforms- In what ways.pdfState the advantages and limitations of using microforms- In what ways.pdf
State the advantages and limitations of using microforms- In what ways.pdf
 
State the first principle of cell theory-Describe the main purpose of.pdf
State the first principle of cell theory-Describe the main purpose of.pdfState the first principle of cell theory-Describe the main purpose of.pdf
State the first principle of cell theory-Describe the main purpose of.pdf
 
state description and classification of the species down below and the (1).pdf
state description and classification of the species down below and the (1).pdfstate description and classification of the species down below and the (1).pdf
state description and classification of the species down below and the (1).pdf
 
Splish Company had the following selected transactions- Apr- 1- 2022 A.pdf
Splish Company had the following selected transactions- Apr- 1- 2022 A.pdfSplish Company had the following selected transactions- Apr- 1- 2022 A.pdf
Splish Company had the following selected transactions- Apr- 1- 2022 A.pdf
 
Stanley had been wondering if he was coming down with the flu- His par.pdf
Stanley had been wondering if he was coming down with the flu- His par.pdfStanley had been wondering if he was coming down with the flu- His par.pdf
Stanley had been wondering if he was coming down with the flu- His par.pdf
 
SQL language 5 points Suppose that for an entity E- there are two cand.pdf
SQL language 5 points Suppose that for an entity E- there are two cand.pdfSQL language 5 points Suppose that for an entity E- there are two cand.pdf
SQL language 5 points Suppose that for an entity E- there are two cand.pdf
 
Standards are important to lean because 1- Workers will know what to d.pdf
Standards are important to lean because 1- Workers will know what to d.pdfStandards are important to lean because 1- Workers will know what to d.pdf
Standards are important to lean because 1- Workers will know what to d.pdf
 
SQL language or a Movies database with a person entity with attributes.pdf
SQL language or a Movies database with a person entity with attributes.pdfSQL language or a Movies database with a person entity with attributes.pdf
SQL language or a Movies database with a person entity with attributes.pdf
 
SQL language For a Movies database with a Person entity and a Movie en.pdf
SQL language For a Movies database with a Person entity and a Movie en.pdfSQL language For a Movies database with a Person entity and a Movie en.pdf
SQL language For a Movies database with a Person entity and a Movie en.pdf
 
SQL language A movie may have many actors- and an actor can act in man (1).pdf
SQL language A movie may have many actors- and an actor can act in man (1).pdfSQL language A movie may have many actors- and an actor can act in man (1).pdf
SQL language A movie may have many actors- and an actor can act in man (1).pdf
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

sql code for this question below Portland Airports Ltd would like a.pdf

  • 1. sql code for this question below Portland Airports Ltd would like a database to be implemented to track information about particular flights. Flights have no. of passengers, flight number, airline, day of the week, time and duration. The status i.e. whether the flight is onTime, cancelled or delayed is also required. All fights use an aircraft and arrive or depart from an airport. By definition, pilots are those employees who are certified on at least one aircraft. An aircraft can be used for any flight provided it has sufficient range. Pilots can pllot any flight provided they are certified on an aircraft with sufficient range and maximum capacity. Employee's personal information and salary are stored. Table 1 - Aircraft Records to be entered Table 2 -Flight Records to be entered Table 3: Emplovee information Task 1 - Implement the ERD shown above. (45 marks) a. Write create and use statements to create the database portlandAirports+ID# [2] b. Create Table Statements [12] (Ensure auto number is used for the Shift table) i. Using appropriate Foreign Keys [ 4 ] ii. Ensure that the mandatory participation is implemented [2] b. Create Table Statements (Ensure auto number is used for the Shift table) i. Using appropriate Foreign Keys ii. Ensure that the mandatory participation is implemented iii. Using correct data types c. Create and name the following constraints i. Ensure that email is unique ii. Ensure that the maxCapacity field has a default value of 100 . d. Modify the respective table to add a minimum and maximum range field to Aircraft. e. Ensure range values are checked to fall within the particular ranges f. Delete the name field from the employee table and add first_name, Middle Initial and last name fields. g. Ensure that the salary field can accept 12 digits of precision with a scale of 2 h. Add the status field to flight and ensure it can only accept the values - cancelled, delaye or OnTime, default to OnTime i. Delete the cargo field from the flight table add the distance Task 2.- Demonstrate interacting with data ( 55 marks) a. Develop appropriate full and partial insert statements for each table (Information in Tables 1 and 2 should be inserted as well as other information given Ensure values are entered in your added columns) b. Add 1 additional records for all tables except the aircraft table c. All Caribbean Airline and Jet Blue flights are delayed. d. Give the first, middle initial, last name, email of all cmployees who are not pilots e. Display the flight number, number of passengers, departure time, arrival time, airline, day, time for all flights that is arriving at the Norman Manley or Donald Sangster airpor Sort the records by airline within arriving airport f. Display all flights that are departing Norman Manley, Toronto or Miami Airports during weekdays (Monday to Thursday) where the second character in the name of the airline is an ' e '. g. Delete one of the records entered h. Display all aircraft that can carry 250 passengers over 9000 miles i. Display each employee's full name (one string), full address (one string), monthly salary in JMDS (assume your own rate), Income Tax ( 25% of salary in excess of $1.5 million) And Net Income (Amount after tax is deducted (All values are to be displayed JMDS. j. What is the total salary the airport pays to male and to female pilots? k. How many employees does the company employ? 1. What is the average range of an aircraft for each manufacturer having a maximum capacity excecding 100 passengers? m . What is the minimum salary paid to a female employce?