Answered step by step
Verified Expert Solution
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:
Actorname YofB, countryofbirth, bio, gender
Directorname YofB, countryofbirth, bio, gender
Producername YofB, countryofbirth, bio, gender
Crewname YofB, countryofbirth, bio,
Countrycode countryname, description
Movietitle release year, genre, budget, cost, grossearnings
DirectorMoviedname, dYofB, title, year
ActorMovieaname, a YofB, title, year
CrewMoviecname, cYofB, mtitle, year
ProducerMoviepname, pYofB, title, year, ptype
Foreign key constraints:
Actorcountryofbirth sube Countrycode
Directorcountryofbirth sube Countrycode
Producercountryofbirth sube Countrycode
DirectorMoviedname, dYofB sube Directorname YofB
DirectorMoviemtitle, myear sube Moviename releaseyear
ActorMovieaname, aYofB sube Actorname YofB
ActorMoviemtitle, myear sube Moviename releaseyear
ProducerMoviepname, pYofB sube Producername YofB
ProducerMoviemtitle, myear sube Moviename releaseyear
CrewMoviecname, cYofB sube Crewname YofB
CrewMoviemtitle, myear sube Moviename releaseyear
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 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, eg 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, eg as actors, directors, etc.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started