A row from a table is selected by: selection, projection, union, or none?

A row from a table is selected by: selection, projection, union, or none?

Verified Sources
Oct 25, 2026

In relational algebra, selecting a subset of rows (tuples) from a table is done with the selection operator [σ][\sigma] (sigma), while projection [π][\pi] keeps the same rows but selects only certain columns (attributes). Union [∪][\cup] combines rows from two relations (tables) after they are union-compatible (same schema).3

Therefore, for the statement:

“A row from a table is selected by … (i) selection operator (ii) projection operator (iii) union operator (iv) none of these”

the correct choice is (i) selection operator. Because selection filters rows according to a predicate. 2

Key terms:

  • Selection Operator
  • Projection Operator
  • Union Operator
  • Predicate

Footnotes

  1. GeeksforGeeks — Introduction to Relational Algebra in DBMS - Defines selection as filtering tuples (rows) and distinguishes it from projection. ↩ ↩2

  2. Wikipedia — Projection (relational algebra) - Defines projection as restricting tuples to a subset of attributes (discarding other attributes). ↩

  3. CSCI 4380 Database Systems Notes (RPI) — Relational Model and Algebra - Defines union as combining tuples from union-compatible relations. ↩

  4. Relational Algebra (UMD CMSC424 PDF) - Gives formal definition/notation for selection operator σp(r). ↩

Relational Algebra: Selection vs Projection vs Union (overview)

How to determine which operator selects a row

  1. 1
    Step 1

    “Select a row” means filtering tuples based on a condition—this corresponds to selection (σ), not projection (π).

  2. 2
    Step 2

    Selection takes one relation and returns the subset of tuples that satisfy a predicate: σp(R)={t∣t∈R and p(t)}\sigma_{p}(R)=\{t\mid t\in R\ \text{and}\ p(t)\}.2

    Footnotes

    1. GeeksforGeeks — Introduction to Relational Algebra in DBMS - Defines selection as filtering tuples (rows) and distinguishes it from projection. ↩

    2. Relational Algebra (UMD CMSC424 PDF) - Gives formal definition/notation for selection operator σp(r). ↩

  3. 3
    Step 3

    Projection chooses columns/attributes and may remove duplicates; it does not filter tuples by a condition.2

    Footnotes

    1. Wikipedia — Projection (relational algebra) - Defines projection as restricting tuples to a subset of attributes (discarding other attributes). ↩

    2. IBM Informix Documentation — Selection and projection - Selection is horizontal subset of rows; projection is vertical subset of columns retaining all rows. ↩

  4. 4
    Step 4

    Union combines tuples from two relations; it does not “pick rows by condition” from one table.2

    Footnotes

    1. CSCI 4380 Database Systems Notes (RPI) — Relational Model and Algebra - Defines union as combining tuples from union-compatible relations. ↩

    2. jcsites.juniata.edu — Relational Algebra - Describes union semantics as keeping rows from either relation; notes union compatibility. ↩

  5. 5
    Step 5

    Since only selection filters rows, the correct option is (i) selection operator.2

    Footnotes

    1. GeeksforGeeks — Introduction to Relational Algebra in DBMS - Defines selection as filtering tuples (rows) and distinguishes it from projection. ↩

    2. Relational Algebra (UMD CMSC424 PDF) - Gives formal definition/notation for selection operator σp(r). ↩

Operator comparison focused on rows vs columns

OperatorWhat it selectsInputOutput
sigma\\sigma (selection)Rows (tuples) matching a predicateOne relationSame attributes, fewer tuples
pi\\pi (projection)Columns (attributes) (subset)One relationFewer attributes, all tuples (duplicates may be removed)
cup\\cup (union)Rows from either of two relationsTwo union-compatible relationsCombined tuples (duplicates removed)

Supporting facts:

  • Selection is defined as taking a subset of rows that satisfy a condition.2
  • Projection discards other attributes; it is vertical filtering of columns.2
  • Union combines two union-compatible relations (same attributes) into one set of tuples.2

Selection Operator Projection Operator Union Operator Union-compatible

Footnotes

  1. GeeksforGeeks — Introduction to Relational Algebra in DBMS - Defines selection as filtering tuples (rows) and distinguishes it from projection. ↩

  2. GeeksforGeeks — Difference between Selection and Projection in DBMS - States selection filters rows; projection selects columns. ↩

  3. Wikipedia — Projection (relational algebra) - Defines projection as restricting tuples to a subset of attributes (discarding other attributes). ↩

  4. IBM Informix Documentation — Selection and projection - Selection is horizontal subset of rows; projection is vertical subset of columns retaining all rows. ↩

  5. CSCI 4380 Database Systems Notes (RPI) — Relational Model and Algebra - Defines union as combining tuples from union-compatible relations. ↩

  6. jcsites.juniata.edu — Relational Algebra - Describes union semantics as keeping rows from either relation; notes union compatibility. ↩

Common confusions (exam-focused)

Pro Tip: Use a row/column mnemonic

If the question says row selection → think selection (σ) (horizontal filtering). If it says column selection → think projection (π) (vertical filtering).

Beware: “UNION” doesn’t mean “filter by condition”

Union (∪) is a set-combining operator for two (union-compatible) relations; it’s not the operator that chooses qualifying rows from a single table.

Operator effect on rows vs columns

Selection filters rows; projection filters columns; union merges rows from two tables.

Typical RA query workflow (row selection then column selection)

Selection (σ)

1) Filter rows

Apply the predicate to reduce the relation to qualifying tuples."

Projection (π)

2) Choose columns

Keep only the required attributes from the filtered tuples."

Union (∪)

3) Combine results (optional)

Merge tuples from multiple relations if needed, provided schemas match."

Knowledge Check

Question 1 of 3
Q1Single choice

In relational algebra, filtering a table to keep only rows that satisfy a condition is done by: