1.

What do you understand about Unary Operations in Relational Algebra with respect to SQL.

Answer»

In Relational Algebra, one operand operations are known as unary operations. The procedures PROJECTION, SELECTION, and RENAME are unary operations in relational algebra:

  • SELECT: The SELECT operation selects a subset of tuples from a relation that fulfils a set of criteria. The SELECT operation is a filter that keeps only those tuples that fulfil a set of criteria. Alternatively, you MAY use the SELECT method to limit the tuples to those that fulfil the criteria. The SELECT operation can be thought of as dividing the relation HORIZONTALLY into two groups of tuples: those that meet the criteria and are selected, and those that do not and are rejected.
  • RENAME: It is occasionally simple and suitable to break a COMPLICATED chain of operations and rename it as a relation with new names. Renaming a RELATIONSHIP can be done for a variety of reasons, including
    • We might want to save the result of a relational algebra expression as a relation so that we can use it later.
    • It's possible that we'll want to join in relation to itself.
  • PROJECT: If a relation is viewed as a table, the SELECT operation selects certain rows while discarding others. In contrast, the PROJECT operation selects a subset of the table's columns while rejecting the remainder. We can use the PROJECT operation to project a relation over just a few of its attributes if we're just interested in a few of them. As a result, the result of the PROJECT operation can be viewed as a vertical partition of the relation into two relations: one with the needed columns (attributes) and the operation's result, and the other with the rejected columns.


Discussion

No Comment Found