Question

Given the following schema: Airport (City, Country, NumberOfRunways) Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType)...

  1. Given the following schema:

Airport (City, Country, NumberOfRunways)

Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType)

Plane (PlaneType, NumberOfPassengers)

Covert it to Relational Algebra way.  The question is, we want to find out:

The Belgian airport that have only domestic flights.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I HOPE ITS HELPFUL TO YOU...IF YOU HAVE ANY DOUBTS PLS COMMENTS BELOW...I WILL BE THERE TO HELP YOU....PLS RATE THUMBS UP.....ALL THE BEST....!

ANSWER ::-

AS FOR GIVEN DATA...

Airport (City, Country, NumberOfRunways)

Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType)

Plane (PlaneType, NumberOfPassengers)

Covert it to Relational Algebra way.  The question is, we want to find out:

SOL ::-

The query in SQL using Except is as follows:

SELECT f.DepartCity FROM Flight f JOIN Airport a1 EXCEPT f.DepartCity != a1.City JOIN Airport a2 EXCEPT f.ArrCity = a2.City WHERE a1.Country != a2.Country AND a1.Country = "Belgain";

The above query will provide all the cities in the Belgian country which have only domestic airports.

I HOPE ITS HELPFUL TO YOU...PLS RATE THUMBS UP ITS HELPS ME ALOT....!

Add a comment
Know the answer?
Add Answer to:
Given the following schema: Airport (City, Country, NumberOfRunways) Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType)...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given the following schema: Airport (City, Country, NumberOfRunways) Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType)...

    Given the following schema: Airport (City, Country, NumberOfRunways) Flight (FlightID, Day, DepartCity, DepartTime, ArrCity, ArrTime, PlaneType) Plane (PlaneType, NumberOfPassengers) Write the SQL queries with A. using except operator, or with “Not IN” operator, then B. covert it to Relational Algebra way. The question is, we want to find out: The Belgian airport that have only domestic flights. Show this query in SQL using Except or “Not IN” (pick only one): Solution: Show this query in Relational Algebra: Solution:

  • 1. Given the following database schema owner(owner_name, age) owns(owner_name, num_cats) Write relational algebra for the following:...

    1. Given the following database schema owner(owner_name, age) owns(owner_name, num_cats) Write relational algebra for the following: Find the name of all owners above the age of 50 Find the name of all owners who own fewer than 5 cats Find the name of all owners who are below the age of 24 and own more than 4 cats 2. Given the following database schema person(name, age, account_id) account(account_id, balance) Write a relational algebra for the following Find the name of...

  • Consider the following relational schema of the company’s database. Use Tuple Relational Calculus (TRC) & Domain...

    Consider the following relational schema of the company’s database. Use Tuple Relational Calculus (TRC) & Domain Relational Calculus (DRC) expression to answer each of the following three questions (Step by step brief description is appreciated if possible) PRODUCT (pid, stock, supplier) CLIENT (cid, name, address, city) ORDER (orderno, date, quantity, pid, cid) Question 1: Find the number of orders for products that are being ordered in quantities smaller than 100 items by customers living in Madrid. Provide solutions expressed both...

  • We are given a relational schema. Study the schema and understand the information contained in each...

    We are given a relational schema. Study the schema and understand the information contained in each column. It is helpful to visualize sample data in each column when you do this. Now, look at each question, that represents a request for business information. Visualize what columns you want in the answer to the question. Formulate a query in relational algebra that will answer the business information request. Make sure you follow the syntax for relational algebra, as shown in class....

  • Given the following Schema : Employee (empNo, fName, lName, address, DOB, sex, position, deptNo) Department (deptNo,...

    Given the following Schema : Employee (empNo, fName, lName, address, DOB, sex, position, deptNo) Department (deptNo, deptName, mgrEmpNo) Project (projNo, projName, deptNo) WorksOn (empNo, projNo, dateWorked, hoursWorked) Where: Employee contains employee details and empNo is the key. Department contains department details and deptNo is the key. mgrEmpNo identifies the employee who is the manager of the department. There is only one manager for each department. Project contains details of the projects in each department and the key is projNo (no...

  • The international airport in Brezuela, a vibrant city in the country of Bonitas, auctions an exclusive...

    The international airport in Brezuela, a vibrant city in the country of Bonitas, auctions an exclusive license every year to a taxi company for the right to serve the airport's passengers. Victor Diego is the owner of Speedy Motors, the taxi company that won this year's license. Currently, with average revenue at $2 per mile, Speedy Motors earns marginal revenue of $1 per mile. Since there are no other taxis available at the airport, Victor feels that they can increase...

  • Problem 1 Consider the following relations containing airline flight information, where the keys are underlined ghts(no:...

    Problem 1 Consider the following relations containing airline flight information, where the keys are underlined ghts(no: integer, from: string, to: string, distance: integer, departs: time, arrives: time) aircraftlaid: integer, aname: string, crusingrange: integer) certified(eid: integer,aid: integer) employees(eid: integer, ename: string, salary: integer) Note that the employees relation describes pilots and other kinds of employees as well; every pilot is certified for some aircraft (otherwise, he or she would not qualify as a pilot), and only pilots are certified to fly....

  • Given the following relational database schema (primary keys are bold and underlined). Answer questions 2.1 to 2.4 Orde...

    Given the following relational database schema (primary keys are bold and underlined). Answer questions 2.1 to 2.4 Orders(orderld, customerld, dateOrdered, dateRequired, status) Customer(customerld, customerLastName, customerStreet, customerCity, customerState, customer Lip OrderDetails(orderld.productld, quantity, lineNumber, amount) Products(productld, name, description, quantity, unitPrice) Account(accountNumber, customerld, dateOpened, creditCard, mailingStreet, mailingCity, mailingState, mailingZip) 2.1 (2 Points) List all possible foreign keys. For each foreign key list both the referencing and referenced relations. 2.2 (2 Points) Devise a reasonable database instance by filling the tables with data of...

  • Flights American Airlines Flight 201 from New York's JFK airport to LAX airport in Los Angeles...

    Flights American Airlines Flight 201 from New York's JFK airport to LAX airport in Los Angeles uses a Boeing 767-200 with 168 seats available for passengers. Because some people with reservations don't show up, American can overbook by accepting more than 168 reservations. If the flight is not overbooked, the airline will lose revenue due to empty seats, but if too many seats are sold and some passengers are denied seats, the airline loses money from the compensation that must...

  • Given the following relational schema, write queries in SQL to answer the English questions. There is...

    Given the following relational schema, write queries in SQL to answer the English questions. There is a shipment database on the MySQL server. You can also use the DDL for MySQL. You must only submit the SQL for your answers but you can include the query output as well to help the TA with marking. Customer(cid: integer, cname: string, address: string, city: string, state: string) Product(pid: integer, pname: string, price: currency, inventory: integer) Shipment(sid: integer, cid: integer, shipdate: Date/Time) ShippedProduct(sid:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT