Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give REASONABLE answers. PART B. Given the following relational schema Persondpid: integer PRIMARY KEY, name: string, age: integer, liftimelncome: float); Moviemid: integer PRIMARY KEY, title:

Give REASONABLE answers. image text in transcribed

PART B. Given the following relational schema Persondpid: integer PRIMARY KEY, name: string, age: integer, liftimelncome: float); Moviemid: integer PRIMARY KEY, title: string, budget: real, yearReleased: integer, director: integer REFERENCES Person); appearsln(pid: integer REFERENCES Person, mid: integer REFERENCES Movie, role: arcbar 10), PRIMARY KEY (pid.mid)); -role is either 'starring'or 'supporting in at cueres belio, anhe anddirectara penon who was the director of a movie. Write the following queries in SQL (this time you may use aggregates, group By, etc.): al Find the pid of all known actors a2. Find the pid of all known actors and directors. (This is NOT meant to be people who were both actors and directors.) b. Find the name and age of each actor who appeared in both a movie released in 1995 and one released in c. Find the name of each person whose lifetime income exceeds the budget of all of the movies that he or she appeared in d. Find the name of each person(s) who directed the movie(s) with the largest budget. e. Find the id of each person who directed 3 or more movies and controlled the largest total amounts. (The director of a movie is said to control its budget.) [In other words, find people who directed 3 or more movies. then select from among them the one(s) whose sum of budgets of movies directed is maximall

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Explain what the third age is.

Answered: 1 week ago

Question

Prepare for a successful job interview.

Answered: 1 week ago

Question

Describe barriers to effective listening.

Answered: 1 week ago

Question

List the guidelines for effective listening.

Answered: 1 week ago