• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
June 21, 2022 |21.2K Views
Operators in Relational Algebra | DBMS
  Share  1 Like
Description
Discussion

In this video, we have covered what are the operators in Relational Algebra & different types of operators/operations in relational algebra.
Mainly, there are two types of languages associated with the relational model, i.e. Procedural and Non-procedural.

Relational algebra is a procedural language whereas Relational calculus is a non-procedural language. Relational algebra is a procedural language that has a collection of organized procedures or processes to assemble a program inside its programming context.

There are various types of relational algebra operations, which are as follows:
1) Select
2) Project
3) Set union
4) Set intersection
5) Set difference.
6) Cartesian Product
7) Rename

Types of Operations in Relational Algebra

1) Select: The selection operator is used to select only that tuple of the relation which satisfies the specific predicate. It eliminates duplicate tuples present in the database table.

2) Project: The projection operator is used to project a particular column from a relation. It is a vertical subset of a given relation. It eliminates the duplicate tuple from the relation.

3) Set Union: If the relations are union compatible then the union of two relations gives all the tuples from the participating relations. Union Compatible means both the relations should have the same kind of attributes the and same number of attributes, this does not mean that both tables should have the same values but the values should be of the same data type in both the table

4) Set Intersection: If the relations are union compatible then the intersection of two relations gives all the tuples from participating relations that are present in both the corresponding relation. It eliminates duplicates.

5) Set Difference: If the relations are union compatible then this operation gives the number of tuples that are in relation with relation1 but not in relation2. It also eliminates duplicates.

6) Cartesian Product: If two relations are merged in such a way that each tuple of relation1 is related to every single tuple of relation2, then it is known as a cartesian product.

7) Rename: Rename operator is used to giving a different name to an original relation

Relational Algebra in DBMS: https://www.geeksforgeeks.org/introduction-of-relational-algebra-in-dbms/

Read More