### Relational Algebra: the Mathematical Set operations

• Set operations

• I can be very brief with this topic because you have had these operations in High School Mathematics classes

• You should all know what set union is:

• Suppose A = {i, j, k} and B = {k, x, y}
• Then the union of A and B is {i, j, k, x, y}

• Note that tuples in sets A and B must have the same FORMAT (same number and type of attributes) to be used in the union operation.

• You should also have learned what set intersection is:

• Suppose A = {i, j, k} and B = {k, x, y}
• Then the intersection of A and B is {k}

• Note that tuples in sets A and B must have the same FORMAT (same number and type of attributes) to be used in the intersection operation.

• You should also have learned what set difference is:

• Suppose A = {i, j, k} and B = {k, x, y}
• Then the difference of A and B is {i, j}

• Note that tuples in sets A and B must have the same FORMAT (same number and type of attributes) to be used in the set difference operation.