CS157a
Chris Pollett
Sep 11, 2019
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:
{('Brad Pitt', '123 Dox Lane, California', M, '9/9/99'), ('Angelina Jolie', '456 L33t Rd., Brentwood' F, '8/8/88')}and `S`:
{('Bobby Fisher', '321 Chess Ave, California', M, '6/6/66'), ('Angelina Jolie', '456 L33t Rd., Brentwood' F, '8/8/88')}.
{('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)}.