a- Find the names of persons who own at least one house in at least country that has a border with Canada. b- Find street number and city name of the shortest street in each city border with Canada. c- Find the names and population sizes of all countries that have a bor Find the names of persons who do not own any houses in Canada house in the USA. d- e- Find the names and areas of cities with at least one street where no

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Please answer this question in 10 mins i will surely rate your answer.

Question 2
Consider the following relations that contain information about countries, cities, streets, and houses.
For each country, name, area and population are kept; and its neighbor countries are stored in Border.
Note that if (Canada, USA) is in Border then that does not mean (USA, Canada) is in Border. You
still need to check separately if (USA, Canada) is in Border or not. For each city, we keep city name,
country name, area, and population of the city. For each street, we keep street number, city name and
length of the street. For each house we keep house number, number of rooms, owner name and street
number.
Country (name, area, population)
City (city-name, country-name, area, population)
House (hno, #rooms, stno, owner-name)
1
Border (country-namel, country-name2)
Street (stno, city-name, length)
Code the following queries using SQL:
a- Find the names of persons who own at least one house in at least one city of at least one
country that has a border with Canada.
b- Find street number and city name of the shortest street in each city in every country that has
border with Canada.
c- Find the names and population sizes of all countries that have a border with the USA.
d- Find the names of persons who do not own any houses in Canada but own more than one
house in the USA.
e- Find the names and areas of cities with at least one street where no house is located.
Transcribed Image Text:Question 2 Consider the following relations that contain information about countries, cities, streets, and houses. For each country, name, area and population are kept; and its neighbor countries are stored in Border. Note that if (Canada, USA) is in Border then that does not mean (USA, Canada) is in Border. You still need to check separately if (USA, Canada) is in Border or not. For each city, we keep city name, country name, area, and population of the city. For each street, we keep street number, city name and length of the street. For each house we keep house number, number of rooms, owner name and street number. Country (name, area, population) City (city-name, country-name, area, population) House (hno, #rooms, stno, owner-name) 1 Border (country-namel, country-name2) Street (stno, city-name, length) Code the following queries using SQL: a- Find the names of persons who own at least one house in at least one city of at least one country that has a border with Canada. b- Find street number and city name of the shortest street in each city in every country that has border with Canada. c- Find the names and population sizes of all countries that have a border with the USA. d- Find the names of persons who do not own any houses in Canada but own more than one house in the USA. e- Find the names and areas of cities with at least one street where no house is located.
SQL operations from the following categories must be used at least once:
SQL Operations from Set Theory (UNION, EXCEPT, INTERSECT)
JOIN Operations
Nested Query
Aliasing
●
Ordering/Grouping of query results (ORDER BY, GROUP BY)
EXISTS, NOT EXISTS, ALL, SOME, ANY
Aggregate Functions in SQL
Transcribed Image Text:SQL operations from the following categories must be used at least once: SQL Operations from Set Theory (UNION, EXCEPT, INTERSECT) JOIN Operations Nested Query Aliasing ● Ordering/Grouping of query results (ORDER BY, GROUP BY) EXISTS, NOT EXISTS, ALL, SOME, ANY Aggregate Functions in SQL
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

where is the rest of the answer.

Solution
Bartleby Expert
SEE SOLUTION
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY