CSE 132A Lecture Notes - Lecture 5: Universal Quantification
Document Summary
Find all actors or directors (select actor as name. Find all actors who are not directors (select actor as name. Ex: for each title in movie, find the # of theaters showing that title. Ex: find the theaters showing more than 1 title. Where t. th = s. th and s. title <> t. title: using count. Where th = s. th and title <> s. title ) Where exists (select : group by + having. Ex: find the theaters showing only movies by berto. Where th = s. th: movie by bero = at least one of the dir is berto, movies may have multiple dir, not in. Where th not in (select th from sch. Where title not in (select title from movie. Titles by berto! (select th from movie, sch. Where movie. title = sch. title and dir <> berto) Where dir = berto ): using the unique dir assumption.