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 releaseyear, genre, budget, cost, grossearnings
DirectorMoviedname, dYofB, mtitle, myear
ActorMovieaname, aYofB, mtitle, myear
CrewMoviecname, cYofB, mtitle, myear
ProducerMoviepname, pYofB, mtitle, myear, ptype
Foreign key constraints:
Actorcountryofbirth Countrycode
Directorcountryofbirth Countrycode
Producercountryofbirth Countrycode
DirectorMoviedname, dYofB Directorname YofB
DirectorMoviemtitle, myear Moviename releaseyear
ActorMovieaname, aYofB Actorname YofB
ActorMoviemtitle, myear Moviename releaseyear
ProducerMoviepname, pYofB Producername YofB
ProducerMoviemtitle, myear Moviename releaseyear
CrewMoviecname, cYofB Crewname YofB
CrewMoviemtitle, myear Moviename releaseyear
In addition:
No attributes are allowed to have NULL values.
Attributes YofB year of birth releaseyear, budget, cost and grossearnings have integer values,
eg
All other attributes have strings as values. Attribute code has as values strings such asCA
GBR Attribute genre in table Movie has as values one of comedydramatragedy
musicalhorror Attribute ptype in table ProducerMovie has as values one of executive
producerassistant producerproducer
Part Write Relational Algebra expressions for the following queries. 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