Question: Consider the relational database schema, which represents population data in states and cities in USA. The STATE relation has a record for each U.S. state

 Consider the relational database schema, which represents population data in states
and cities in USA. The STATE relation has a record for each
U.S. state including the state's capital city name. The City relation has

Consider the relational database schema, which represents population data in states and cities in USA. The STATE relation has a record for each U.S. state including the state's capital city name. The City relation has a record for each U.S. city. Each relation also includes the current population (CURR_POPULATION) in each state and in each city. The other two relations show the population history in each state and city (assume that an annual population estimate is kept for each year). Primary keys are underlined and foreign keys are shown as directed arrows. [SNAME stands for State name, CNAME stands for city name, CAPITAL_CITY stands for capital city which is also a city name.]. Also note that, the same city name can exists in several states. For example, both Texas and Virginia has a city with name "Arlington". Each state is located to a region, For example, "SouthWest", "NorthEast" and so on. Based on the relational database schema, please specify the following queries in SQL (Question 4 Question 6) For each state in "Southwest" region, retrieve the state name, state's current population, state's capital city name and capital city population. For each city in the state of Colorado, retrieve the city name and population history from the year 2000 until the year 2010

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!