Reference no: EM13189345
Consider the following schema of an online flight reservation agency.
Customer(cid, lastName, firstName, dob)
Flight(fid, airline, fromCity, toCity, stops, onTime)
Reservation(cid, fid, date)
Attribute dob is the customer's date of birth, stops is the number of stops (0-??) a flight requires, and onTime is a percentage (0-100) indicating how often a flight is on time. Keys are underlined.
The set {lastName, firstName, dob} is also a key for Customer. However, the set {airline, fromCity, toCity, stops, onTime} is not a key for Flight since an airline may provide, say, di_erent flights with two stops from Bu_alo to Orlando, one stopping in Atlanta and one in New York, both of which are always on time. Attributes cid and fid in Reservation are foreign keys referencing homonymous attributes in Customer and Flight, respectively. Write Relational Algebra queries only that find (each 6 marks, except last two which weight 8 marks - total 52 marks):
1. cid's of customers who reserved some flight to Boston and some flight to New York.
2. cid's of customers who reserved some flight to Miami or some flight to Houston, but not both.
3. cid's of customers who never reserved AirTran flights or flights to Houston.
4. cid's of customers who reserved every flight that is on time at least 85% of the time.
5. cid's of customers who reserved every flight that the customer with cid=5 reserved.
6. cid's of customers who reserved at least three distinct JetBlue flights to Miami.
7. Pairs of cid's of distinct customers who reserved the same flight and the first in the pair reserved before the second.
8. Pairs of cid's of distinct customers who reserved all the same flights. If (c1, c2) is returned, do not return (c2, c1).
Design the guide to the history of visual communication
: Your next step as an intern helping to design the guide to the history of visual communication is to gather at least six pieces of art or design for the chapter on art forms throughout the ages. The pieces you pick should be pieces of art or design t..
|
Will fields with both oil and gas have greater difficulties
: Some fields have large enough quantities of both oil and natural gas that coordination must be achieved for the production of both, rather than oil a in our examples. Will fields with both oil and gas have greater difficulties in unitization than ..
|
Describe effects of one chemical-biological and radiological
: Describe the effects of one chemical, biological, and radiological agent; include the proper decontamination and treatment methods for each. Explain one dispersal device/delivery method for each selected chemical, biological, and radiological agent.
|
Inventory items stored in Sudbury
: Give the details of all suppliers in the Sault Ste Marie, list all inventory items with a quantity less than 100 units and list all the inventory items stored in Sudbury
|
Write Relational Algebra queries
: Attributes cid and fid in Reservation are foreign keys referencing homonymous attributes in Customer and Flight, respectively. Write Relational Algebra queries
|
Design an algorithm to find the selling price
: To make a profit, the prices of the items sold in a furniture store are marked up by 60%. Design an algorithm to find the selling price of an item sold at the furniture store. What information do you need to find the selling price?
|
What is the direct labor rate variance?
: The following data relate to direct labor costs for the current period:
|
What range of payments will the beekeeper accept
: Assuming that the beekeeper gets that amount, what range of payments will the farmer accept (Remember that negative payments are also possible.) Answer the same questions for the fifth day.
|
Write the symbolic logic for the 3des decryption
: How would you protect the passwords on your system using some of the mechanisms we have studied? Discuss implementation strategies and explain your decisions.
|