CS157a
Chris Pollett
Sep 12, 2018
The three most common operations on sets are union, intersection, and difference. For relations, we will use the following notations and definitions for their meaning:
{('Bobby Fisher', '123 Maple St, Hollywood', M, '9/9/99'), ('Angelina Jolie', '456 Oak Rd., Brentwood' F, '8/8/88')}and `S`:
{('Bobby Fisher', '123 Maple St, Hollywood', M, '9/9/99'), ('Catherine DeNeuve', 'Somewhere in France' F, '8/8/60')}.
{('Star Wars', 1977, 124, 'sciFi', 'Fox' 12345), ('Galaxy Quest', 1999, 104, 'comedy', 'DreamWorks', 67890), ('Waynes World', 1992, 95, 'comedy', 'Paramount', 99999)}.
{('Star Wars', 1977, 124), ('Galaxy Quest', 1999, 104), ('Waynes World', 1992, 95)}.
{('sciFi'), ('comedy')}. //notice its a set, so only one copy of comedy
{('Star Wars', 1977, 124, 'sciFi', 'Fox' 12345)}.