Skip to content

Relational Algebra

  • It is procedural query language.

  • It gives a step by step process to obtain the result of the query.

  • It uses operators to perform queries.

Types of Relational Operation

1. Select Operation

  • Selects the tuples that satisfies a given predicate.

  • Denoted by sigma (σ).

2. Project Operation

  • Shows the list of those attributes that we wish to appear in the result.

  • Denoted by ∏.

3. Union Operation

  • Union operation contains all the tuples that are either in table A or B or both A and B.

  • Notation: A∪B

4. Set Intersection:

  • Suppose there are two tuples R and S. The set intersection operation contains all tuples that are in both R & S.
  • Notation: R ∩ S

5. Set Difference:

  • Suppose there are two tuples R and S. The set intersection operation contains all tuples that are in R but not in S.
  • Notation: R - S

6. Cartesian Product:

  • The Cartesian product is used to combine each row in one table with each row in the other table.
  • Notation: R x S

7. Rename Operation:

  • Rename the output relation.
  • Denoted by rho(ρ)