• retagged by
740 views
1 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#])}

1 Answer

0 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:
Position:
Show:

Related questions

2 2 votes
3 answers 3 answers
1.7k
1.7k views
Bikram asked Nov 26, 2016
1,718 views
A student can register for at most $p$ courses and each course can have at most $v$ students. Each student is enrolled to at least one course and each course has at least...
1 1 vote
2 2 answers
1.1k
1.1k views
Bikram asked Nov 26, 2016
1,132 views
Consider the relation $R(A, B, C, D, E)$ with the set of function dependencies: $F = \{ AB \rightarrow C, \ \ D \rightarrow E, \ \ A \rightarrow D \}$ The candidate K...
2 2 votes
1 answers 1 answer
734
734 views
Bikram asked Nov 26, 2016
734 views
The rule that a value of a foreign key must appear as a value of some specific table is called aReferential constraintIndexIntegrity constraintFunctional dependency
2 2 votes
1 answers 1 answer
2.2k
2.2k views
Bikram asked Nov 26, 2016
2,215 views
Each dealer owns one or more cars and each car is owned by at-most one dealer. If Dealer table has $20$ tuples and Cars table has $60$ tuples then owns table can have max...