The GATE Grind

GATE 2015 CS – Question 31

Databases · Relational Model: Relational Algebra, Tuple Calculus, SQL · 1 mark · Multiple choice

SELECT operation in SQL is equivalent to

  1. the selection operation in relational algebra
  2. the selection operation in relational algebra, except that SELECT in SQL retains duplicates
  3. the projection operation in relational algebra
  4. the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (D) the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Explanation

The SELECT clause chooses columns, which is projection in relational algebra. Unlike relational algebra, SQL does not remove duplicate rows unless DISTINCT is used.