GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 76(b)(i)

Universal project participation by set difference

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 1997 paper

GATE 1997, Q76(b)(i) Descriptive
Report issue

Relational Algebra & Calculus

Question 76(b)(i), GATE 1997: Relations are EMP(eno,name,age), PROJ(pno,name), and INVOLVED(eno,pno). The underlined primary keys are EMP.eno, PROJ.pno, and the composite key (eno,pno) of INVOLVED. EMP describes employees, PROJ projects, and INVOLVED employee–project participation. Use ordinary set relational algebra unless a different model is explicitly stated. In at most 15 words state what this relational-algebra expression determines:
π_eno(INVOLVED) − π_eno((π_eno(INVOLVED) × π_pno(PROJ)) − INVOLVED).
The two b-subparts together carry 4 marks; their individual marks are not printed.
Question 76(b)(i), GATE 1997: Relations are EMP(eno,name,age), PROJ(pno,name), and INVOLVED(eno,pno). The underlined primary keys are EMP.eno, PROJ.pno, and the composite key (eno,pno) of INVOLVED. EMP describes employees, PROJ projects, and INVOLVED employee–project participation. Use ordinary set relational algebra unless a different model is explicitly stated. In at most 15 words state what this relational-algebra expression determines:
π_eno(INVOLVED) − π_eno((π_eno(INVOLVED) × π_pno(PROJ)) − INVOLVED).
The two b-subparts together carry 4 marks; their individual marks are not printed.
Question 76(b)(i), GATE 1997: Relations are EMP(eno,name,age), PROJ(pno,name), and INVOLVED(eno,pno). The underlined primary keys are EMP.eno, PROJ.pno, and the composite key (eno,pno) of INVOLVED. EMP describes employees, PROJ projects, and INVOLVED employee–project participation. Use ordinary set relational algebra unless a different model is explicitly stated. In at most 15 words state what this relational-algebra expression determines:
π_eno(INVOLVED) − π_eno((π_eno(INVOLVED) × π_pno(PROJ)) − INVOLVED).
The two b-subparts together carry 4 marks; their individual marks are not printed.
Tap to enlarge
Answer & solution

Answer: Employee numbers of involved employees who participate in every project. (no official key was published)

Requested short answer: Employee numbers of involved employees who participate in every project.

This is 10 words, within the requested limit. The wording involved employees preserves the candidate domain actually used by the expression. For the derivation, let C=π_eno(INVOLVED) be the employee numbers appearing in at least one involvement row, let P=π_pno(PROJ) be all project numbers, and let R=INVOLVED.

The product C×P enumerates every employee–project pair that would be required if each candidate participated in every project. Subtracting R leaves missing pairs: a pair (e,p) remains exactly when e is a candidate, p is a project, and the participation (e,p) is absent. Projecting those missing pairs onto eno produces the candidates who fail to participate in at least one project. Finally, subtracting that set from C leaves the candidates with no missing project.

Formally, the result is {e∈C: for every p∈P, (e,p)∈R}. This is the usual division construction R÷P with its candidate universe drawn from R. For example, if P={1,2}, candidate 7 appears with both projects and candidate 8 only with project 1, the missing-pair set contains (8,2), so only 7 remains.

Two boundary details matter. EMP is not referenced, so the expression does not independently check that every eno is a valid employee if referential integrity is absent. If PROJ is empty, C×P is empty, the missing-candidate set is empty, and the result is C by vacuous truth. It is not automatically all rows of EMP; employees absent from INVOLVED are outside the candidate universe even in that empty-project case. The short answer is therefore narrower and more faithful than an unconditional claim that all employees participating in every project are returned.

Original paper, page 12