UGC-NET Jun 2013 · ER-Model

MCQ · 2 marks · Problem DBMS-RELM-0047

The “PROJECT” operator of a relational algebra creates a new table that has always
  1. A
    More columns than columns in original table
  2. B
    More rows than original table
  3. C
    Same number of rows as the original table
  4. D
    Same number of columns as the original table

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionPROJECT \(\pi\) is a vertical operation: it keeps a chosen subset of columns and passes every row through, with no row filtering (only selection \(\sigma\) filters rows). Under the bag semantics of SQL tables, the result has the same number of rows as the input. Under pure set semantics, duplicate rows created by dropping columns would be merged.(A) Projection never adds columns — incorrect.(B) It never adds rows — incorrect.(D) It normally keeps fewer columns — incorrect.Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com