1.

Classify the following operations in relational algebra into unary and binary operations:(1) UNION(2) SELECT(3) SET DIFFERENCE(4) PROJECT(b) Explain about SELECT, INTERSECTION and SET DIFFERENCE operations with example.

Answer»

(a) Unary Binary

(2) SELECT

(1) UNION

(4) PROJECT

(3) SET DIFFERENCE

(b) SELECT operation

SELECT operation is used to select tuples in a relation that satisfy a selection condition. Greek letter cr (sigma) is used to denote the operation.

Syntax,

σCondition(relation)

eg. σSalary<100000(EMPLOYEE)-selects tuple whose salary is less than 10000 from EMPLOYEE relation.

Intersection operation 

This operation returns a relation consisting of all the tuples appearing in both of the specified relations. It is denoted by n. It can takes place only on compatible relations, e.g. FOOTBALL ∩ CRICKET returns the players who are in both football and cricket teams.

Set difference operation (-)

All tuples appearing in the first relation and not in the second



Discussion

No Comment Found