Relational Operators

There are 8 relational operators:

  1. SELECT Selects rows from a table that have specified attribute values.

  2. PROJECT Selects rows made up of a subset of columns from a table.

  3. PRODUCT Builds a relation from two specified relations consisting of all possible combinations of rows, one from each of the two relations.

  4. UNION Builds a relation consisting of all rows appearing in either or both of the two relations.

  5. INTERSECT Builds a relation consisting of all rows appearing in both of the two relations.

  6. DIFFERENCE Builds a relation consisting of all rows appearing in the first and not in the second of the two relations.

  7. DIVIDE Takes two relations, one binary and one unary, and builds a relation consisting of all values of one column of the binary relation that match, in the other column, all values in the unary relation. Ex. A: B: a x x

    a y y

    a z

    b x

    c y

    => A DIVIDE B: a Basically, A/B = <m> such that for every n value in a tuple of B there is <m, n> in A.

Last updated