Question: Write the expression please not an ai solution, explain it clearly thanks. Consider a relational schema for storing information related to movies: Person ( name

Write the expression please not an ai solution, explain it clearly thanks. Consider a relational schema for storing information related to movies: Person(name, YofB, country_of_birth, country_of_residence, bio, gender, age) Country(code, country_name, description) Movie(title, release_year, genre, budget, cost, gross_earnings, country) Credit(name, YofB, title, year, role) Foreign key constraints: Person[country_of_birth] Country[code] Person[country_of_residence] Country[code] Movie[country] Country[code] Credit[name, YofB] Person[name, YofB] Credit[title, year] Movie[title, release_year] In addition: No attributes are allowed to have NULL values. Attributes YofB (year of birth), release_year, budget, cost, age and gross_earnings have integer values, e.g.,1978,2023,1000234,26000000,37,12607000. All other attributes have strings as values. Attribute code has as values strings such as,CA,GBR. Attribute genre in table Movie has as value one of {comedy,drama,tragedy,musical,horror}. Attribute role in table Credit has as value one of {actor,director,assistant director,executive producer,assistant producer,producer,crew member}. Note that a person can be associated with a movie through more than one role, e.g., a person can both direct and executive produce a movie and thus may appear several time in table Credit in connection to a movie. 2 Part 1.[32 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. Find all movies with a very diverse cast, i.e., a cast composed of actors residing in at least 10 different countries. (Note that each person has only one country of residence.) For each movie, return its title and year of release. The output/result table should have only two attributes (title, year_of_release) b. Identify the individuals who have only directed films within a single genre, e.g., solely comedies or dramas. The persons returned by this query may be associated with movies they directed in other capacities as well, e.g., as actors, producers, etc., but this aspect is not relevant for this query. For each such person return their name and year of birth. The output/result table should have only two attributes (name, year_of_birth) c. Find all pairs of people where one person acted in at least two different movie directed by the other. (Both directors and assistant directors are included.) For each pair, return only the names of both individuals. The output/result table should have only the following attributes (name, name), where the second name belongs to the person who directed the first person in at least two different movies.

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 Programming Questions!