The results of relational algebra are also relations but without any name.
The RENAME operator is used to rename the output of a relation.
Sometimes it is simple and suitable to break a complicated sequence of operations and rename it as a relation with different names. Reasons to rename a relation can be many, such as:
We may want to save the result of a relational algebra expression as a relation so that we can use it later.
We may want to join (or cartesian product) a relation with itself. In that case, it becomes too confusing to specify which one of the tables we are talking about. In that case, we rename one of the tables and perform join operations on them.
Symbol: ρ (rho)
Notation: ρ x (E)
⇒ Where the symbol 'ρ' is used to denote the RENAME operator and E is the result of the expression or sequence of operations which is saved with the name X.
⇒ SQL: Use the AS keyword in the FROM clause.
⇒ Example: Students AS Students1 renames Students to Students1.
⇒ SQL: Use the AS keyword in the SELECT clause to rename attributes (columns).
⇒ Example: RollNo AS SNo renames RollNo to SNo.