Question
USE the following Database schema for the question: BOLDED are primary keys Movie( title, year, director, budget, earnings) Actor( stagename , realname, birthyear) ActedIn (stagename,
USE the following Database schema for the question: BOLDED are primary keys
Movie(title, year, director, budget, earnings)
Actor(stagename, realname, birthyear)
ActedIn(stagename, title, year, pay)
CanWorkWith(stagename, director)
------
QUESTION: Express each of queries (a)-(f) in both
(i) Relational Algebra, and (ii) SQL: EXPLAIN UR QUERIES
a) Find the titles and years of movies in which actor(s) with real name Maurice Micklewhite acted.
b) Find the names of directors with whom every actor can work.
c) Find the stage names of the actors with the highest pay for acting in a movie.
d) Find the stage names and real names of actors who have never acted in a movie that has made a profit (i.e. earnings > budget).
e) Find the titles of movies that have been used more than once (e.g. Titanic in 1943, 1953 and 1997).
f) Find all pairs of stage names (renamed stagename1 and stagename2) such that the actor with stagename1 acted in the same movie as the actor with stagename2, but earned less for acting in that movie.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started