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
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...
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F28e7be30-eca9-4147-a850-5833b744a665%2F75e15669-ede1-45b5-9ab5-993278729cab%2F3wwzzm9_processed.png&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F28e7be30-eca9-4147-a850-5833b744a665%2F75e15669-ede1-45b5-9ab5-993278729cab%2F99m27b9_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY