in Databases edited by
309 views
1 vote
1 vote

Consider the following relations
Employee (E#, Ename, salary, Bdate, D#)
Department (D#, Dname, mgremp#, Location)
Dependent (E#, DependentName)

Which among these tuple calculus queries represent the following condition:

List the names of mangers who have at least one dependent.

  1. {m[Ename] | m ∈ EMPLOYEE ∧ ∃u, t (t ∈ DEPENDENT ∧ u ∈ DEPARTMENT ∧ t[E#] = u[mgremp#] ∧ m[E#] = u[mgremp#])}
  2. {e[Ename] | e ∈ EMPLOYEE ∧ ∃d (d ∈ DEPARTMENT ∧ d[Ename] = ‘manager’ ∧ e[D#] = d[D#])}
  3. {m[Ename] | m ∈ EMPLOYEE ∧ ∃u, t (t ∈ DEPENDENT ∧ u ∈ DEPARTMENT ∧ e[E#] = u[mgremp#] ∧ m[D#] = u[mgremp#])}
  4. {e[Ename] | m ∈ EMPLOYEE ∧ ∃u, t (t ∈ DEPENDENT ∧ u ∈ DEPARTMENT ∧ t[E#] = u[D#] ∧ m[E#] = u[D#])}
in Databases edited by
by
309 views

2 Comments

moved by
sir ji tuple calculus ने परेशानी में डाल रखा है ..plz explain it
1
1
practise ! practise ! practise !
0
0

1 Answer

0 votes
0 votes

After some observation, it seems easier to just eliminate wrong answers rather than trying to find the right one.

B is wrong because obviously it doesn’t seem correct to have “manager” as the name of some employee ;)

C, D are wrong because these expressions are using the tuple variable “e” without ever defining it(associating it with some table/relation).

So A is the only choice left.

Answer:

Related questions