Open In App

GATE | GATE CS 1997 | Question 75

Improve
Improve
Like Article
Like
Save
Share
Report

Consider the following relational database schema:

EMP (eno name, age)
PROJ (pno name)
INVOLVED (eno, pno)

EMP contains information about employees. PROJ about projects and INVOLVED about which employees involved in which projects. The underlined attributes are the primary keys for the respective relations.
a). What is the relational algebra expression containing one or more of {σ,π,x,u,−} which is equivalent to SQL query.

select eno
from EMP, INVOLVED 
where EMP.eno=INVOLVED.eno  
and INVOLVED.pno=3

b). State in English (in not more than 15 words).
What the following relational algebra expressions are designed to determine

(i) πeno(INVOLVED) − πeno((πeno(INVOLVED) X πpno(PROJ))−INVOLVED)
(ii) πage(EMP) − πEage<EMP.age(ρE(EMP) x EMP))

(Note: ρE(EMP) conceptually makes a copy of EMP and names it K (ρ is called the rename operator))


Answer:

Explanation:

Quiz of this Question


Last Updated : 30 Oct, 2017
Like Article
Save Article
Share your thoughts in the comments
Similar Reads