Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider two relation instances below, with the following schemas: Country(count

ID: 3669190 • Letter: C

Question

Consider two relation instances below, with the following schemas:

Country(country_name, continent); [country_name should be underlined as a key]
City(city_name, country_name, is_capital, population); [city_name & country_name should be underlined]

Write a relational algebra expression and show its result when the expression is executed with the given instances:

(a) List the names of all European cities with population of more than 600,000.
(b) List the names of all countries for which no cities have been entered into the City table.
(c) List names and continents of countries that are either in Europe or whose capitals have a population of over 1 million.

city name New York, NY Washington, DC Philadelphia, PA country name is capital populatiorn US US country name continent North America North America Hamburg Canada England Europe Germany Europe France Mali Mali Mali Timbuktu

Explanation / Answer

a)

city_name((contentinent= 'europe'(country)(population > 600000)(city))

city_name(contentinent= 'europe' and population > 600000 (country)(city))

city_name

berlin

hambury

paris

lyon

-----------------------------------------------------------------------------------------------------------------------------------------------

b)

country_name(country)country_name(city)

country_name

england

---------------------------------------------------------------------------------------------------------------------------------------------

c)

continent='europe'(country)U country.country_name,country.continent(((is_capital='yes' and population>1000000(city))country)

country_name

england

germang

france

mali

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote