Question: Question 2 ( 4 0 points ) Consider a database schema with three relations: Actors _ ( aid:integer, aname:string, age:real, city:string, state:string ) Movies (

Question 2(40 points)
Consider a database schema with three relations:
Actors_(aid:integer, aname:string, age:real, city:string, state:string)
Movies (mid:integer, mname:string, year:integer, studio:string)
Playsin( aid:integer, mid:integer, character:string)
Primary keys are underlined in each relation. Attribute actor id (aid) uniquely identifies an actor in Actors relation.
As shown, in addition to id, every actor has a name (aname), an age, and a city and a state.
Attribute mid (movie id) uniquely identifies a movie in relation Movies. In addition to id, every movie has a name
(mname), a year (year) and a studio that produced it (studio).
Relation Playsin contains information about actors who played in movies. Attribute character contains the name
of the character that the actor, identified by aid played in the movie, identified by mid.
For each of the following, write a relational algebra expression that produces the desired results.
A. Find the names of actors who live in 'MA' state.
B. Find the names and the ages of actors who are either from 'Boston' or 'New York'.
C. Find the names of actors who are younger than 25 and are from 'Los Angeles'.
D. Find the names, cities and states of actors who played as character 'Peter Pan'.
E. Find the names of the actors who played in a movie named 'Titanic'.
F. Find the name of actors who played in some movie in year 2010, and did not play in any movie in 2020.
G. Find the names of the actors who played in movies only in 2000.
H. Find the names of actors who are older than 25 and played in some movie produced by 'Universal' studio.
I. Find the names of the actors who played in a movie produced by 'WB' studio in 2018 and did not play in any
movie produced by 'Universal' (in any year).
J. Find the names of actors who played in movies both in 2018 and 2020.
Question 2 ( 4 0 points ) Consider a database

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 Programming Questions!