0

Given the following relational schemas, where the primary keys are in bold:

movie(movieName, whenMade);

actor(actorName, age);

studio(studioName, location, movieName);

actsIn(actorName, movieName);

How do you find the list of actors who have played in EVERY movie produced by "Universal Studios"?

My attempt:

π actorName ∩ (σ studioName=“Universal Studios” studio) |><| actsIn, where |><| is the natural join

Are you supposed to use cartesian product and/or division? :\

philipxy
  • 14,867
  • 6
  • 39
  • 83
Naomi
  • 81
  • 1
  • 8

1 Answers1

0

Here are the two steps that you should follow:

  1. Write an expression to find the names of movies produced by “Universal Studio” (the result is a relation with a single attribute)

  2. Divide the relation actsIn by the result of the relation obtained at the first step.

This should give you the expected result (i.e. a relation with the actor names that have played in every movie of the “Universal Studio”).

Renzo
  • 26,848
  • 5
  • 49
  • 61