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) Director(name, YofB, country_of_birth, bio) Producer(name, YofB, country_of_birth) Country(code, name) Movie(title,

Consider a relational schema for storing information related to movies: Actor(name, YofB, country_of_birth, Attribute genre in table Movie has as value one of {

Consider a relational schema for storing information related to movies: Actor(name, YofB, country_of_birth, bio) Director(name, YofB, country_of_birth, bio) Producer(name, YofB, country_of_birth) Country(code, name) Movie(title, year, genre, budget, gross_earnings) DirectorMovie(d name, d YofB, m_title, m_year) ActorMovie(a name, a YofB, m title, m year) ProducerMovie(p name, p YofB, m title, m year) Actor[country_of_birth] Country[code] Director[country_of_birth] Country[code] Producer[country_of_birth] Country[code] DirectorMovie [d_name, d_YofB] Director[name, YofB] DirectorMovie[m_title, m_year] Movie [name, year] ActorMovie [a_name, a_YofB] Actor[name, YofB] ActorMovie [m_title, m_year] Movie[name, year] ProducerMovie [p_name, p_YofB] Producer[name, YofB] ProducerMovie [m_title, m_year] Movie [name, year] Attribute genre in table Movie has as value one of {"comedy", "drama", "tragedy", "musical", "horror"}. Attributes YofB and year have integer values, e.g., 2022. Atributes budget and gross_earnings have integer values, e.g., 1 000 000. Attributes code and name in relation Country have values such as, "CAN", "GBR", and "Canada", "United Kingdom", respectively. Write the following queries in Relational Algebra. a. Find the producers who also acted in a movie they produced. Return their names and year of birth. b. Find producers who were younger than all the actors of the movies they produced. Return their name and year of birth. c. Find producers who only produced comedies and dramas. Return their name and year of birth. d. Find actors who never acted in a tragedy. Return their name and year of birth.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here are the queries youve requested expressed in Relational Algebra a Find the producers who also a... 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

Database management systems

Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff

3rd edition

72465638, 978-0072465631

More Books

Students also viewed these Databases questions