Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a relational schema for storing information related to movies: Actor ( name , YofB, country _ of _ birth, bio, gender ) Director (

Consider a relational schema for storing information related to movies:
Actor(name, YofB, country_of_birth, bio, gender)
Director(name, YofB, country_of_birth, bio, gender)
Producer(name, YofB, country_of_birth, bio, gender)
Crew(name, YofB, country_of_birth, bio, )
Country(code, country_name, description)
Movie(title, release year, genre, budget, cost, gross_earnings)
DirectorMovie(d_name, d_YofB, m title, m_year)
ActorMovie(a_name, a YofB, m title, m year)
CrewMovie(c_name, c_YofB, m_title, m_year)
ProducerMovie(p_name, p_YofB, m_title, m year, p_type)
Foreign key constraints:
Actor[country_of_birth] sube Country[code]
Director[country_of_birth] sube Country[code]
Producer[country_of_birth] sube Country[code]
DirectorMovie[d_name, d_YofB] sube Director[name, YofB]
DirectorMovie[m_title, m_year] sube Movie[name, release_year]
ActorMovie[a_name, a_YofB] sube Actor[name, YofB]
ActorMovie[m_title, m_year] sube Movie[name, release_year]
ProducerMovie[p_name, p_YofB] sube Producer[name, YofB]
ProducerMovie[m_title, m_year] sube Movie[name, release_year]
CrewMovie[c_name, c_YofB] sube Crew[name, YofB]
CrewMovie[m_title, m_year] sube Movie[name, release_year]
Part 1.[30 points] Write Relational Algebra expressions for the following queries. Use only the
operators presented in class. Do not use extended Relational Algebra operators, e.g., grouping,
counting, etc.
a. List the name and year of birth of all those who acted in at least two movies which they also
directed.
b. List the name and year of birth of all directors who were younger than all the actors cast in the
movies they directed, at the time the movie was released. (The persons returned by this query may
be associated with movies in other capacities as well, e.g., as actors, directors, executive
producers, etc. Person A is "younger" than person B is the age of person A is less or equal to the
age of person B.)
c. List the name and year of birth of all producers who only produced in one type of movie, for
example only acted in comedies. (The persons returned by this query may be associated with
movies in other capacities as well, e.g., as actors, directors, etc.)

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions