Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

Different types of Grading?

Answered: 1 week ago

Question

Explain the functions of financial management.

Answered: 1 week ago

Question

HOW MANY TOTAL WORLD WAR?

Answered: 1 week ago

Question

Discuss the scope of financial management.

Answered: 1 week ago