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)

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.

  1. Show this query in SQL using Except or “Not IN” (pick only one):

Solution:

  1. Show this query in Relational Algebra:

Solution:

0 0
Add a comment Improve this question Transcribed image text
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
  • **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART F) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and...

    **************PLEASE COMPLETE PART E) ONLY************** Consider the following relational database schema (primary keys are underlined) and SQL query: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) SELECT g.guestNo, g.guestName FROM Room r, Booking b, Hotel h, Guest g WHERE h.hotelNo = b.hotelNo AND g.guestNo = b.guestNo AND h.hotelNo = r.hotelNo AND h.hotelName = "Ritz" AND dateFrom >= "Jan 01, 2001" AND dateTo <= "Dec 31, 2001"; (A) state what...

  • 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:...

  • Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient...

    Intro to database systems: Q7. Formulate the following SQL query in relational algebra using an efficient way. The schema is given in the following. Emp(eno, ename, title, city) Proj(pno, pname, budget, city) Works(eno, pno, since) SELECT ename FROM Works , Emp WHERE Works.pno = ‘P150’ AND Works.eno = Emp.eno

  • 1.If you do not have the world schema you can obtain the scripts to create the...

    1.If you do not have the world schema you can obtain the scripts to create the database schema from https://dev.mysql.com/doc/index-other.html Queries 1. Write a SQL subquery that shows the unique region names where the languages spoken are English, French or German. 2. Write a SQL query that shows the country name, region, language for the Caribbean region 3. Write a SQL query that shows the country name once and shows the number of cities in that country. The number of...

  • 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:...

  • 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....

  • The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state,...

    The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) FIELD(fieldnum, id, title) INTEREST(fieldnum* acnumk, descrip) Some notes on the Academics database An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR) A research field (FIELD) often...

  • The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode)...

    The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) FIELD(fieldnum, id, title) INTEREST(fieldnum* acnumk, descrip) Some notes on the Academics database An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR) A research field (FIELD) often...

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

    Given the following relational schema, write queries in SQL to answer the English questions. The Access Database for the schema is available, as is a DDL file. It is also available on the MySQL server. You must only submit the SQL for your answers. You can get your answers without using a DBMS or by using Access or MySQL. Customer(cid: integer, cname: string, address: string, city: string, state: string) Product(pid: integer, pname: string, price: currency, inventory: integer) Shipment(sid: integer, cid:...

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
ADVERTISEMENT