Let be the following database sketch:
Cineroom(Name, Hour, Name)
Film(Name, Director, Actor)
How to express, in relational algebra the difference between:
- which actors played in a film they produced?
- which actor produced a film?
To my mind it was the difference between Cartesian product and outer join:
ΠActor(σProducer=Actor(Film ⋈ Produce))
Would it allow to join only the films the actor played and produced in the first case?