Question

In: Computer Science

Given aircraft (ano ,amodel, mfgYr) fleet ( fno, src ,dest, ano ,pno ) pilot (pno, pname,...

Given aircraft (ano ,amodel, mfgYr) fleet ( fno, src ,dest, ano ,pno ) pilot (pno, pname, gender)
write relational alzebra query for the following
1. find those pnames who havent taken a fleet
2. retreive the fno ,amodel that the pilot has named 'abc' flew

Solutions

Expert Solution

1. Retrieve pname of pilots,who havent taken a fleet.

STRUCTURED QUERY : SELECT pilot.pname FROM pilot WHERE pilot.pno NOT IN (SELECT fleet.pno FROM fleet);
RELATIONAL ALGEBRA QUERY : pilot.pname pilot.pno =(fleet.pno(fleet)) (pilot)

2. Retrieve fno, amodel that the pilot has named "abc" flew.

STRUCTURED QUERY : SELECT fleet.fno FROM fleet INNER JOIN pilot ON fleet.pno=pilot.pno WHERE pilot.pname="abc" AND pilot.ano IN ( SELECT aircraft.ano,aircraft.amodel FROM aircraft INNER JOIN fleet ON aircraft.ano=fleet.ano);
RELATIONAL ALGEBRA QUERY :

fleet.fnopilot.pname="abc"^pilot.ano =

[aircraft.ano,aircraft.amodel((aircraft)aircraft.ano=fleet.ano(fleet))]

((fleet)fleet.pno=pilot.pno(pilot))


Related Solutions

Given the following tables: Aircraft (ano, amodel, mfgYr) Fleet (fno, src, dest, ano, pno) Pilot (pno,pname,gender)....
Given the following tables: Aircraft (ano, amodel, mfgYr) Fleet (fno, src, dest, ano, pno) Pilot (pno,pname,gender). Write Relational Algebra Query for the following. (i) Find those female pnames who has not taken a fleet dest of ‘Alabama’ but taken a fleet src to ‘Bahama’ (ii) Retrieve the fno, amodel of the aircraft manufactured in 2015 that the male pilot has had a flight on
Airlines are comprised of many types of aircraft within their fleet to accomplish the route structure...
Airlines are comprised of many types of aircraft within their fleet to accomplish the route structure for the airline. Discuss the core components of planning for airlines from a fleet management perspective. You should examine how the airline’s fleet can impact route structure, the customer experience, safety, and the planning process. Include an example on how this can impact your mock airline’s passenger demand patterns from a pleasure vs. business travel perspective.
Should Emirates expand it's fleet to a mix of aircraft (aka United Airlines), or should they...
Should Emirates expand it's fleet to a mix of aircraft (aka United Airlines), or should they enter a global code-share alliance? Explain your reasoning.
Gromit plc operates a fleet of commercial aircraft. On 21 February 20X1 the government passed a...
Gromit plc operates a fleet of commercial aircraft. On 21 February 20X1 the government passed a new law requiring the mandatory upgrade of the electronic security systems on board all commercial aircraft. The deadline to complete the upgrade works was 31 September 20X1 and failure to meet the deadline would be punishable with a penalty of £1 million. Gromit plc drafted an upgrade plan and estimated total upgrade costs to be £2 million, however by 31 December 20X1 (Gromit plc’s...
The Airline industry provides passenger and freight transport services through its fleet of aircraft flying to...
The Airline industry provides passenger and freight transport services through its fleet of aircraft flying to domestic and international destinations. The industry is part of the air travel value chain which includes suppliers as well as distributors of the main service provider, the airlines' company. The chain is set up to cater to the needs of the ultimate customers in the process, air travellers. Qantas Airlines is the designated national carrier of Australia. It operates both domestically and internationally. The...
Question 3 The statement of cash flows for SRC is reproduced here: SRC, INC. & SUBSIDIARIES...
Question 3 The statement of cash flows for SRC is reproduced here: SRC, INC. & SUBSIDIARIES Consolidated Statements of Cash Flows ($ in thousands) FOR PERIOD ENDED Year 9 ($) Year 8 ($) Year 7 ($) Cash flows from operating activities: Net income Adjustments to reconcile net income to net cash flows from operating activities: Pretax non-recurring charge Depreciation and amortization Deferred compensation expense Deferred income taxes Pretax gain on sale of subsidiary Loss on disposal of fixed assets Changes...
Prepare an Action plan for an SRC Treasurer of an institution.
Prepare an Action plan for an SRC Treasurer of an institution.
You are designing a small randomized trial (a pilot study) to compare ketamine (given by infusion)...
You are designing a small randomized trial (a pilot study) to compare ketamine (given by infusion) to placebo (also given by infusion) for treatment-resistant depression in adolescents ages 12 to 17 years. (Someone with treatment resistant depression has tried many anti-depressant therapies/medications which have not successfully alleviated the depression.) You are concerned that people you recruit to this study: - may be at different stages of development (puberty, brain development, etc.) because of the age range; - may have different...
Small aircraft arrive at a private airport according to a given Poisson process at a rate...
Small aircraft arrive at a private airport according to a given Poisson process at a rate of 6 per hour. What is the probability that exactly 5 small aircraft arrive in the first hour (after opening) and exactly 7 arrive in the hour after that? What is the probability that fewer than 5 small aircraft arrive in the first hour and at least 10 arrive in the hour after that? What is the probability that exactly 5 small aircraft arrive...
Given the following relations: PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename,...
Given the following relations: PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP_CODES(Zip, City, State) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty) Where Qoh stands for quantity on hand and Olevel stands for (re)order Level. The P, C, E and O single letter prefixes for attributes refer to the parts, customers, employees and orders relations, respectively. a. Retrieve the names of customers who have ordered parts costing less than $150.00. b. Retrieve the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT