Relational Algebra Symbols

 

Relational algebra is one of the procedural languages to ensure the relation between the data or information. In relational algebra, it has six operator those are categorized by three types as (i). Unary operator, (ii). Binary operator and (iii). Logical operator these operators are set the relations between the data’s in the given information’s. Each operator have its own symbol, with the help of symbol we can specified the relation. The relational algebra symbols are used in the database management systems.

 

 

 


Relational Algebra Symbols:
Unary Operators
Selection                         `sigma`Projection                        `pi`Renaming                          `rho`
Binary Operators
Union                             `uu`Intersection                      `nn`Difference                          —
Cartesian product                 `xx`Join                               ?
Logical Operators
Logical AND                       `^^`Logical OR                        `vv`Logical NOT                       `not`
There are three kinds major "relational algebra symbols" are mentioned in the above. Using this symbols we can all kinds of operations, For example we do the following operations for given data.Problems on Relational Algebra Symbols
Example Problems on Relational Algebra Symbols
Consider the following “Student_detail” table:
Stu_id            Stu_name             Year__of_join
111101                Jack                    1994
111102                John                    1993
111103                Anne                    1995
Example 1:   Select from the relation “year” all the students whose year of joining is greater than 1993.
s Year_of_join > 1993(Student_detail);
The list of detail are extracted base on condition the result is,
Stu_id            Stu_name             Year__of_join
111101                Jack                      1994
111103                Anne                    1995
Example 2: Select from the relation “year” all the students whose year of joining is less than or equal to 1993.
s Year_of_join < 1993(Student_detail);
Stu_id            Stu_name             Year__of_join
111102                John                     1993
Example 3:   List all the student with the help of relation symbols.
? stu_name, stu_id (Student_detail);
Stu_id            Stu_name             Year__of_join
111101                Jack                    1994
111102                John                    1993
111103                Anne                    1995
Example 4: Consider the Following Table to find (AUB), (AnB) and (A – B)?
Table-A
S.no        Name             Location
1           Nancy            Canada
2           Stuart             England
3           Anne             England


Table-B
S.no        Name             Location
2           Stuart             England
3           Alex               Canada
AUB is
S.no        Name             Location
1           Nancy            Canada
2           Stuart             England
3           Anne              England
3           Alex                Paris
AnB is

S.no        Name             Location
2           Stuart             England
(A - B)is
S.no        Name             Location
1           Nancy            Canada
3           Anne             England