Unary Operators (Selection and Projection) MCQs: 11 Solved Questions

Solve 11 past-paper MCQs on relational-algebra selection and projection, from recognising each operator to composing and transforming expressions safely.

KnowledgeGate Team

Exam prep & CS education

Updated 8 Aug 20267 min read

Selection and projection look like two easy symbols, but their distractors switch rows with columns, confuse SQL SELECT with relational-algebra selection, or remove an attribute before a predicate can use it. Keep one rule beside you: selection filters tuples and usually preserves degree; projection chooses attributes and can reduce degree and cardinality because duplicate projected tuples are removed. Every question below is a past-paper item from GATE, UGC NET, DSSSB, ISRO, Cognizant, Coal India, BEL or Beltron. Choose an option first, then check both the answer and the reason. More of the surrounding syllabus sits under CS Fundamentals.

1. Selection versus projection: build the row-column model first

Both are unary because each takes one relation. σ_condition(R) keeps rows that satisfy a Boolean condition and retains every attribute. Degree stays unchanged; cardinality cannot increase. π_attribute-list(R) keeps named columns. Its degree is the number of projected attributes, and duplicate output tuples collapse under set semantics.

Use this relation as the reference:

Eid

Name

Dept

Salary

101

Asha

Tech

72000

102

Bala

HR

55000

103

Charu

Tech

68000

104

Dev

Tech

72000

105

Esha

Sales

65000

For σ_{Dept="Tech" ∧ Salary≥70000}(Employee), only (101, Asha, Tech, 72000) and (104, Dev, Tech, 72000) pass. Degree is 4 → 4; cardinality is 5 → 2. Charu sits in Tech too, but 68000 misses the 70000 floor, so both conjuncts do real work.

Apply π_{Name,Salary}. The result is (Asha, 72000) and (Dev, 72000): degree 4 → 2, cardinality 2 → 2. With π_{Salary}, both rows produce (72000), so the duplicate collapses to one tuple.

Two-stage diagram: selection filters the Employee table to two Tech rows, then projection keeps only the Name and Salary columns.

2. Recognise the unary operator and the job of selection

Question 1 (Coal India 2020)

Which of the following is a unary operation?

  • A. Intersection

  • B. Projection

  • C. Join

  • D. Cartesian Product

Correct answer: B. Projection. Projection reads one relation. Intersection, join and Cartesian product require two. Unary describes the number of inputs, not output columns. Open the solved question.

Question 2 (BEL 2023)

In context of Relational Algebra of Database Management System, SELECT operation is used to select a subset of the tuples from a relation that satisfy a _____ .

  • A. Attribute Criteria

  • B. Block Criteria

  • C. Selection Criteria

  • D. Relation Criteria

Correct answer: C. Selection Criteria. Selection evaluates a Boolean predicate tuple by tuple. For Salary ≥ 70000, Asha and Dev pass; Bala, Charu and Esha fail. The complete Boolean test is the selection criterion. Open the solved question.

Question 3 (Beltron Programmer 2025)

In relational algebra, what is the main purpose of the selection (σ) operator when applied to a relation?

  • A. It eliminates duplicate tuples from the relation.

  • B. It filters tuples based on a given condition.

  • C. It merges two relations based on a common attribute.

  • D. It sorts the attributes of the relation in increasing sequence.

Correct answer: B. It filters tuples based on a given condition. Selection is horizontal filtering. Projection exposes duplicate removal, merging belongs to join, and basic relational algebra does not promise display order. Open the solved question.

3. Read projection notation and distinguish it from selection

Question 4 (Beltron Programmer 2025)

How is π{A, C}(R) interpreted if relation R(A, B, C) contains tuples?

  • A. Output only columns A and C, discarding B

  • B. Compute a new attribute from A and C

  • C. Select tuples where attribute A or C is non-null

  • D. Join columns A and C

Correct answer: A. Output only columns A and C, discarding B. For (1, x, 9), (2, y, 8) and (1, z, 9), projection gives (1,9), (2,8), (1,9). Removing the duplicate leaves (1,9) and (2,8). Open the solved question.

Question 5 (DSSSB 2021)

Write the name of the relational algebra operation as per the given order of their notation.

Notation:

Π , X , σ

  • A. Projection, Cartesian product, division

  • B. Projection, Cartesian product, select

  • C. Intersection join, outer join, select

  • D. Projection, outer join, select

Correct answer: B. Projection, Cartesian product, select. In order, Π or π is projection, X or × is Cartesian product, and σ is selection. Only the middle operation is binary. Open the solved question.

Question 6 (ISRO 2007)

Which operation is used to extract specified columns from a table?

  • A. Project

  • B. Join

  • C. Extract

  • D. Substitute

Correct answer: A. Project. “Specified columns” points to projection. Extract is ordinary English, join combines relations, and substitute is not a core operator. Open the solved question.

4. Translate English conditions into selection expressions

Question 7 (DSSSB 2021)

Consider the following relation schema of students.

STUDENT (Rollno, Name, DOB, Marks, Gender)

Which of the given query is equivalent to this query in English?

“Find the tuples of student having marks above 80”.

  • A. σ Marks > 80 (STUDENT)

  • B. π Marks > 80 (STUDENT)

  • C. σ Marks < 80 (STUDENT)

  • D. π Marks < 80 (STUDENT)

Correct answer: A. σ Marks > 80 (STUDENT). “Find the tuples” requires σ; “above 80” means strict Marks > 80. With no projection, all five STUDENT attributes remain. Open the solved question.

Question 8 (Cognizant 2024)

How to retrieve data from relation ‘Professor’ where department name is ‘Mathematics’ and salary is greater than ’65,000’?

  • A. σdept_name = “Mathematics” ⋀ salary>65000 (Professor)

  • B. σ “Mathematics” ⋀ salary>65000 (Professor)

  • C. σdept_name = “Mathematics” and salary>65000 (Professor)

  • D. σ salary>65000 (Professor) ⋀ dept_name = “Mathematics”

Correct answer: A. σdept_name = “Mathematics” ⋀ salary>65000 (Professor). The predicate is dept_name = "Mathematics" ∧ salary > 65000. Meera at 68000 passes; Nitin at 65000 fails the strict comparison. B omits an attribute, C uses prose, and D leaves a condition outside σ. Open the solved question.

5. Compose selection and projection in the right order

Question 9 (UGC NET 2013)

Consider the following schemas: (NET-DEC-2013)

Branch = (Branch-name, Assets, Branch-city)

Customer = (Customer-name, Bank name, Customer-city)

Borrow = (Branch-name, loan number, customer account-number)

Deposit = (Branch-name, Account-number, Customer-name, Balance)

Using relational Algebra, the Query that finds customers who have balance more than 10,000 is ________

  • A. π customer-name (σ balance > 10000 (Deposit))

  • B. σ customer-name (σ balance > 10000 (Deposit))

  • C. π customer-name (σ balance > 10000 (Borrow))

  • D. σ customer-name (π balance > 10000 (Borrow))

Correct answer: A. π customer-name (σ balance > 10000 (Deposit)). Read inside out. Kavya at 12500 and Ritu at 18000 pass; Mohan at 9000 fails. Projecting Customer-name gives Kavya and Ritu. Borrow has no Balance attribute. Open the solved question.

6. Optimise cascaded selections and projections safely

Question 10 (GATE 2014)

What is the optimized version of the relation algebra expression π A₁ (π A₂ (σ F₁ (σ F₂ (r)))) where A₁, A₂ are sets of attributes in r with A₁ ⊂ A₂ and F₁, F₂ are Boolean expressions based on the attributes in r?

  • A. π A₁ (σ (F₁ ∧ F₂) (r))

  • B. π A₁ (σ (F₁ ∨ F₂) (r))

  • C. π A₂ (σ (F₁ ∧ F₂) (r))

  • D. π A₂ (σ (F₁ ∨ F₂) (r))

Correct answer: A. π A₁ (σ (F₁ ∧ F₂) (r)). Successive selections combine as F₁ ∧ F₂. Since A₁ ⊂ A₂, the final projection can go directly to A₁. With the reference predicates Dept="Tech" and Salary≥70000, projecting {Eid,Salary} gives (101,72000) and (104,72000). Open the solved question.

Question 11 (GATE 1998)

Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s. expression) is incorrect?

R₁ and R₂ are relations. C₁, C₂ are selection conditions and A₁, A₂ are attributes of R₁.

  • A. σ C₁ (σ C₂ R₁) → σ C₂ (σ C₁ (R₁))

  • B. σ C₁ (π A₁ R₁) → π A₁ (σ C₁ (R₁))

  • C. σ C₁ (R₁ ∪ R₂) → σ C₁ (R₁) ∪ σ C₁ (R₂)

  • D. π A₁ (σ C₁ (R₁)) → σ C₁ (π A₁ (R₁))

Correct answer: D. π A₁ (σ C₁ (R₁)) → σ C₁ (π A₁ (R₁)). Let R₁(Eid,Dept,Salary), A₁={Eid,Salary} and C₁: Dept="Tech". The left side filters before projecting. The right side deletes Dept before testing it. A pushed projection must retain every predicate and final-output attribute. Open the solved question.

7. Score the set and choose the next drill

Treat this as a diagnostic. With 9 to 11 correct, move to mixed SQL and relational-algebra translation. With 6 to 8, redo Questions 4, 8, 9 and 11 while marking rows versus columns. With 0 to 5, rebuild the Employee result first.

The short version:

  • σ filters rows.

  • π chooses columns.

  • Read compositions from the inside out.

  • Never push projection past a predicate unless every predicate attribute survives.

Next, solve SQL Query MCQs: 12 Solved (SELECT, Joins, Subqueries), then use SQL Queries and Joins in DBMS: sublanguages, joins and GROUP BY worked out to repair a gap. For a semester-oriented CS route, see the ZERO TO HERO complete CS course. For placement revision, use Computer Science Fundamentals for Placements by Sanchit Sir. Neither is required for these answers; first redo every miss without the options.