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

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!