Question

Answer only in the form of symbol relational algebra. Consider the following relations and relationship: Passenger(passengerNo,...

Answer only in the form of symbol relational algebra. Consider the following relations and relationship:

Passenger(passengerNo, name, gender, address, phone)

Flight (flightNo, airline, plane, departure_city, arrival, distance)

Booking(passengerNo, flightNo, date, cost)

1. List the flightNo and airline of all the flights whose departure_city is houston

2. List the maximum, minimum, and average distance of the flights

3. List the passengerNo, name of all the passengers who have arrival on Houston

Homework Answers

Answer #1

1.∏flightNo, airline(σ departure_city="houston" (Flight))

2.for the maximum

∏ distance(Flight) - ∏ y.distance (σ x.distnance > y.distance (ρ x(∏ distance(Flight)) X ρ y(∏ distance(Flight))) OR using aggregate function:- FMax(distance)(Flight)

for minimum

∏ distance(Flight) - ∏ x.distance (σ x.distnance > y.distance (ρ x(∏ distance(Flight)) X ρ y(∏ distance(Flight)))  OR using aggregate function:- FMIN(distance)(Flight)

for average FAVG(distance) (Flight)

3.∏Passenger.passengerNo ,Passenger.name(σ Flight.arrival="Houston"(Passenger |X| Flight |X| Booking))

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Complete and correct answer is required to give full credit,thank you Consider the following set of...
Complete and correct answer is required to give full credit,thank you Consider the following set of requirements for an airline database that is used to keep track of flights, passengers, employees etc. for an airline. You will be graded not only on the correctness and completeness of the design but also on its quality. 1)     It is important to keep track of each passenger's name, address, phone number and meal preference (values could be vegetarian, sea-food, italian, anything). At times, it...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address,...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address, phone, email, FedTaxId, StaTaxId) employee (empId, driverId, ssno, name, branchId) customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId) equipment (equipId, name, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId ) manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email) rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId) 1) Use relational algebra to list all equipment in detail, including the name of the customer if the equipment is...
Consider the following relational schema: Author (first_name, last_name, address) Book (title, copyright, first_name, last_name) Edition (isbn,...
Consider the following relational schema: Author (first_name, last_name, address) Book (title, copyright, first_name, last_name) Edition (isbn, pub_date, list_price, publisher, title, copyright) Bookstore (name, address) Stock (store_name, store_price, isbn) - The Author relation gives the author's first name, last name and address. Each (first_name-last_name) pair is unique. - The Book relation gives the title, copyright date, and the first and last names of the author. A book can have only one author however, an author can write more than one book....
The following is about databases: queries on relational algebra Consider the following schemas for a LinkedIn-like...
The following is about databases: queries on relational algebra Consider the following schemas for a LinkedIn-like professional network. Note this is a slightly simplified version from your last assignment. Assume that the connections are mutual. Person (PID, first_name, last_name, age, gender) School (school_ID, school_name, type, city, state) Education (PID, school_ID, degree, major, year) Company (company_ID, company_name, total_asset, headquarter) Branch (company_ID, branch_num, city, state) WorksAt (PID, company_ID, branch_num, start, end) Connection (PID, friend_ID) For each relation, the attribute(s) of the primary...
The following is about databases: queries on relational algebra Consider the following schemas for a LinkedIn-like...
The following is about databases: queries on relational algebra Consider the following schemas for a LinkedIn-like professional network. Note this is a slightly simplified version from your last assignment. Assume that the connections are mutual. Person (PID, first_name, last_name, age, gender) School (school_ID, school_name, type, city, state) Education (PID, school_ID, degree, major, year) Company (company_ID, company_name, total_asset, headquarter) Branch (company_ID, branch_num, city, state) WorksAt (PID, company_ID, branch_num, start, end) Connection (PID, friend_ID) For each relation, the attribute(s) of the primary...
1. Consider the following tables in a relational database. Provide the appropriate "SELECT" SQL statement necessary...
1. Consider the following tables in a relational database. Provide the appropriate "SELECT" SQL statement necessary to answer the queries that follow. Primary keys are underlined and foreign key fields have an asterisk at the end of the field. CUSTOMERS (CUST-NO, C-NAME, C-ADDRESS, BALANCE) SALESPERSONS (SP-NO, S-NAME, DATE-EMPLOYED, SALARY) SALES (INVOICE-NO, DATE, CUST-NO*, SP-NO*) a) List the salesperson name and salary for all sales to customers whose balance outstanding is greater than 20000. b) List the names and addresses of...
draw the entity relationship model for the following data he system needs to record details of...
draw the entity relationship model for the following data he system needs to record details of all registered vehicles driven in the local government area. A vehicle is identified by a Vehicle Identification Number (VIN). Background reading on a VIN is available from several sites such as ​AutoCheck​. The government wishes to record the type of vehicle, such as motorbike, car, truck etc, the year the vehicle was manufactured and the model such as CX3, as vehicle attributes. Vehicles are...
Use the case study description and list of requirements below to create an entity-relationship diagram showing...
Use the case study description and list of requirements below to create an entity-relationship diagram showing the data requirements of the All You Need Are Toys Library database. Your ERD should be able to be implemented in a relational DBMS. Toy libraries operate in a manner similar to book libraries, with members able to borrow a toy for a number of weeks then return it. As with book libraries, toy libraries enable families to have access to a wider range...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...