## Relational Calculus

 Question 1
 A I and II B I and III C II and IV D III and IV
Database Management System        Relational Calculus       2009
Question 1 Explanation:
R={a,b,c}
S={c}

It looks like Division operator. Since a division operator in E(A,B)/ P(B) will be equal to

Now replacing A=R-S P=r
B=S
E=r
we will get,

equivalent to I
∴ It is equivalent to division operator.
⇒ r(R-S,S)/r(S)

This logical statement means that
① Select t(R-S) from r such that
② for all tuples U in S,
③ there exists a tuple V in r, such that
④ U=V[S] & t=V[R-S]
A(x,y) & B(y)
A/B = {(x) | ∃(x,y)∈A(y)∈B}
which means that A/B contains all x tuples, such that for every tuple in B, there is an xy tuple in A.
So, this is just equivalent to I.

This logical statement means that
① Select t(R-S) from r such that
② for all tuples V in r,
③ there exists a tuple U in r, such that
④ U=V[S] & t=V[R-S]
⇒ Select (R-S) values from r, where the S value is in (r/r), which will be true only if S in r is a foreign key referring to S is r.

This selects (a,b) from all tuples from r which has an equivalent value in S.
 Question 2
 A I only B II only C III only D III and IV only
Database Management System        Relational Calculus       Gate-2008
Question 2 Explanation:
Demorgan law:
∀xP(x)≡∼∃x(∼P(x))
∼∀x(∼P(x))≡∃x(P(x))
Given: ∀t ∈ r(P(t))------ (1)
As per Demorgan law
(1) ⇒ ∼∃t ∈ r(∼P(t))
which is option (III).
 Question 3
 A The empty set B schools with more than 35% of its students enrolled in some exam or the other C schools with a pass percentage above 35% over all exams taken together D schools with a pass percentage above 35% over each exam
Database Management System        Relational Calculus       Gate 2008-IT
Question 3 Explanation:
Query having the division with
{ x | x ∈ Enrolment ∧ x . school-id = t } | * 100 > 35 }
This is school with enrollment % is 35 or above.
 Question 4

 A Names of employees with a male supervisor. B Names of employees with no immediate male subordinates. C Names of employees with no immediate female subordinates. D Names of employees with a female supervisor.
Database Management System        Relational Calculus       Gate-2007
Question 4 Explanation:
The given Tuple Relational calculus produce names of employees with no immediate female subordinates.
 Question 5
Which of the following relational calculus expressions is not safe?
 A {t|∃u ∈ R1 (t[A] = u[A])∧ ¬∃s ∈ R2 (t[A] = s[A])} B {t|∀u ∈ R1 (u[A]= "x" ⇒ ∃s ∈ R2 (t[A] = s[A] ∧ s[A] = u[A]))} C {t|¬(t ∈ R1)} D {t|∃u ∈ R1 (t[A] = u[A])∧ ∃s ∈ R2 (t[A] = s[A])}
Database Management System        Relational Calculus       Gate-2001
There are 5 questions to complete.