Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM 3 ONLY Relational algebra & it's implementation (SQL: DDL & DML) Consider two relation instances below, with the following schemas Country (country name, continent);

PROBLEM 3 ONLY

image text in transcribed

Relational algebra & it's implementation (SQL: DDL & DML) Consider two relation instances below, with the following schemas Country (country name, continent); City (city name, country name, is_capital, population) Problem 1, Use SQL(DDL) to create the above two tables, and populate the data as shown in the below two instances Problem 2. In each question (a)-(d) below, write a Relational Algebra expression and show its result when the expression is executed with the given instances. Problem 3. For each question (a)-(d) below, write a SQL(DML) statement, and implement it in the Oracle, then copy&paste your screenshot of the returned result from the Oracle system. Country country_name US Canada England German France Mali continent North America North America Europe Europe Europe Africa Cit country_name is_capital US US US Canada Canada Germany German Germany France France Mali Mali Mali population city name New York, NY Washington, DC Philadelphia, PA Ottawa Toronto Berlin Hambur Bonn Paris Lyon Bamako Timbuktu no 600000 1500000 800000 2500000 no 300000 2000000 700000 2000000 50000 100000 no yes no (a) List the names of all European cities with population of more than 500,000 (b) List the names of all countries whose cities do not exist in 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. (d) List all pairs of cities such that one of them is a capital of some country, and the other is a non-capital city in that same country. For each city in the pair, list its name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

4. How has e-commerce affected business-to-business transactions?

Answered: 1 week ago