Skip to content
Official PYQ · 2015

GATE CS 2015 Set 1 Q7 — Tuple Calculus and SQL

Explain with AI

SELECT operation in SQL is equivalent to

Choose one option
View worked solution

Answer: D

To understand the equivalence between SQL and Relational Algebra (RA), let us compare their core operations:

  1. Projection (π\pi) in Relational Algebra: This operation selects specific columns (attributes) from a relation. Since relational algebra is based on set theory, the projection operator automatically eliminates duplicate tuples.
  2. SELECT clause in SQL: The SELECT clause in an SQL query (e.g., SELECT column_name FROM table_name) is used to choose specific columns, which is conceptually identical to the projection operation (π\pi). However, SQL is based on multisets (bags) rather than pure sets, meaning it retains duplicate rows by default unless the DISTINCT keyword is specified.
  3. Selection (σ\sigma) in Relational Algebra: This operation filters rows (tuples) based on a given condition. In SQL, this filtering is performed by the WHERE clause, not the SELECT clause.

Thus, the SELECT operation in SQL is equivalent to the projection operation in relational algebra, with the difference that SQL retains duplicates.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Tuple Calculus and SQL questions