SELECT operation in SQL is equivalent to

2015

SELECT operation in SQL is equivalent to

  1. A.

    the selection operation in relational algebra

  2. B.

    the selection operation in relational algebra, except that SELECT in SQL retains duplicates

  3. C.

    the projection operation in relational algebra

  4. D.

    the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Attempted by 1557 students.

Show answer & explanation

Correct answer: D

Short answer: SELECT in SQL corresponds to the projection operation in relational algebra, except that SQL retains duplicate rows by default (use DISTINCT to remove duplicates).

  • Projection (relational algebra) = choosing columns (attributes). Example: SELECT name FROM Students corresponds to projecting the name attribute.

  • Difference: relational-algebra projection removes duplicate rows; SQL's SELECT keeps duplicates unless you use SELECT DISTINCT.

  • Note: The selection operation in relational algebra corresponds to SQL's WHERE clause (it filters rows), not to SELECT.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir