Relational Algebra
Operators: tuple sets as input, new set as output
Basic Binary Set Operators
- Result is table (set) with same attributes
- Sets must be compatible!
- R1(A1,A2,A3) ? R2(B1,B2,B3) ? Domain(Ai) = Domain(Bi)
- Union
- All tuples in either R1 or in R2
- Intersection
- All tuples in both R1 and R2
- Difference
- All tuples in R1 but not in R2
- Complement - what’s the universe?
Selection, Projection, Cartesian Product, Join