Question: 1. [2 points] Write a query that lists the theaters and the districts which are showing the movie with the title Beautiful. 2. [2 points]

 1. [2 points] Write a query that lists the theaters and
1. [2 points] Write a query that lists the theaters and the districts which are showing the movie with the title
Beautiful.
2. [2 points] Write a Relational Algebra expression for the query in the previous question.
3. [3 points] Write a query that lists the name and address of theatres playing movies with length greater than
100.
4. [3 points] Write a Relational Algebra expression for the query in the previous question.
5. [3 points] Write a query that lists the movie name, movie length and district name of the longest movie played
in each district.
6. [3 points] Write a Relational Algebra expression for the query in the previous question.

Consider a database with the following schema: 1. The movies table stores the movies played in theaters throughout the city. 2. The districts table stores the city districts where the movie theaters are located. 3. The theaters table stores movie theaters. 4. The movies2theaters table stores the movies and the corresponding theaters that play that movie. 5. The theaters2districts table lists the theaters and their districts; note that some theaters belong to several districts. Tables like movies2theaters and theaters2districts are sometimes called "junction" tables. They store foreign keys from main tables and connect them in this way. Junction tables are not usually meant to store any additional data/objects. Before you start answering the questions, it is helpful to understand the schema and browse the data. You could start by issuing a few trivial select * queries from tables in the schema (e.g. SELECT FROM movies;). You can use your home folder as temporary storage for your queries and result listings

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!