UNION - (A + B): adding tuples from two relations to form a third [union compatible - same number of attributes from the same domain]
DIFFERENCE (A - B): relation where the tuples are in A but not B
INTERSECTION: relation containing tuples that are in both A and B
PRODUCT (AxB): concatenation of every tuple of one relation with every tuple from the second relation
PROJECTION (vertical subset): operation that selects specified attributes from a relation [ex. STUDENT[Major, GradeLevel]
SELECTION (horizontal subset): operation that selects specified tuples from a relation
JOIN (combination of product, selection, and possibly projection)
Expressing Queries in Relational Algebra
What are the names of all students? (STUDENT[Name])
What are the student numbers of all students enrolled in a class? (ENROLLMENT[StudentNumber])
What are the student numbers of all students not enrolled in a class? (STUDENT[SID] - ENROLLMENT[StudentNumber])
What are the numbers of students enrolled in the class BD445? (ENROLLMENT WHERE ClassName = 'BD445' [StudentNumber])
What are the names of the students enrolled in class BD445? (STUDENT JOIN (SID = StudentNumber) ENROLLMENT WHERE ClassName = 'BD445' [STUDENT.Name])
What are the names and meeting times of 'PARKS' classes? (STUDENT WHERE Name='PARKS' JOIN (SID = StudentNumber) ENROLLMENT JOIN (ClassName = Name) CLASS [CLASS.Name, Time])