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: Personname YofB, countryofbirth, countryofresidence, bio, gender, age Countrycode countryname, description Movietitle releaseyear, genre, budget, cost, grossearnings, country Creditname YofB, title, year, role Foreign key constraints: Personcountryofbirth Countrycode Personcountryofresidence Countrycode Moviecountry Countrycode Creditname YofB Personname YofB Credittitle year Movietitle releaseyear In addition: No attributes are allowed to have NULL values. Attributes YofB year of birth releaseyear, budget, cost, age and grossearnings have integer values, eg All other attributes have strings as values. Attribute code has as values strings such asCAGBR Attribute genre in table Movie has as value one of comedydramatragedymusicalhorror Attribute role in table Credit has as value one of actordirectorassistant directorexecutive producerassistant producerproducercrew member Note that a person can be associated with a movie through more than one role, eg a person can both direct and executive produce a movie and thus may appear several time in table Credit in connection to a movie. Part points Write Relational Algebra expressions for the following queries. Use only the operators presented in class. Do not use extended Relational Algebra operators, eg grouping, counting, etc. a Find all movies with a very diverse cast, ie a cast composed of actors residing in at least different countries. Note that each person has only one country of residence. For each movie, return its title and year of release. The outputresult table should have only two attributes title yearofrelease b Identify the individuals who have only directed films within a single genre, eg solely comedies or dramas. The persons returned by this query may be associated with movies they directed in other capacities as well, eg 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 outputresult table should have only two attributes name yearofbirth 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 outputresult 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
