Question

    Which of the following is NOT a valid relational algebra

    operation?                            
    A UNION Correct Answer Incorrect Answer
    B INTERSECT Correct Answer Incorrect Answer
    C DIFFERENCE Correct Answer Incorrect Answer
    D JOIN Correct Answer Incorrect Answer
    E SELECT Correct Answer Incorrect Answer

    Solution

    Relational algebra is a theoretical language used for querying and manipulating relations (tables) in a relational database. The key operations in relational algebra are:

    • UNION : Combines the results of two queries and returns distinct rows present in either relation.
    • INTERSECT : Returns the rows that are present in both relations.
    • DIFFERENCE : Returns rows from the first relation that are not in the second relation.
    • SELECT : A unary operation that retrieves a subset of rows from a relation based on a condition.
    However, JOIN is not part of basic relational algebra. It is an extension of relational algebra that combines tuples from two relations based on a condition (e.g., an equality condition). Although it is commonly used in relational databases, it is technically not a basic relational algebra operation. Why other options are incorrect:
    • A, B, C, and E are all valid relational algebra operations, as they represent basic operations to manipulate and retrieve data from relations.

    Practice Next