in Unknown Category edited by
600 views
0 votes
0 votes

Which of the following operation of relational algebra, selects certain columns from the table and discards the other columns?

  1. SELECT
  2. PROJECT
  3. DIVISION
  4. None of the above
in Unknown Category edited by
by
600 views

4 Answers

4 votes
4 votes

Select keyword is an SQL keyword and cannot be used in Relational algebra.But it performs the mentioned job

Project is used to project the required list of attributes from the given relation

  • It is an unary operation
  • The cardinality of the attribute list may change iff the given attribute list is not a super key as RA eliminates duplicates in o/p
  • It provides vertical partition
  • The degree of the  relation may be changed

NOTE: Relation Algebra operations are used to obtain data from database so the actual data is left unchanged only the required operation is performed and presented.

 

Division operation is the reverse of the cross product and doesn't serves the given purpose.

 

Clearly answer is option B.

1 vote
1 vote

PROJECT operation selects columns from the table and discards other columns.

Whereas SELECT operation is used to choose a subset of the tuples from a relation that satisfies a selection condition.

edited by
1 vote
1 vote

Select operation is used for horizontal partitioning .

Project operation is used for vertical partitioning.

Division  operation is used for obtaining all the values of a column which is paired with all the values of  column of another table .

0 votes
0 votes
In SQL, SELECT wouldve been correct but for Relational Algebra, Select is used to filter out tuples based on conditions in which attributes are used as input, and Project is used to select the required attributes once we are satisfied with the instance we have