Question 1 |

A relation r(A,B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to 20. Assume that the attributes A and B are independently distributed.

The estimated number of tuples in the output of \sigma _{(A > 10)\vee(B=18)}(r) is ____________

The estimated number of tuples in the output of \sigma _{(A > 10)\vee(B=18)}(r) is ____________

1200 | |

205 | |

15 | |

820 |

Question 1 Explanation:

Question 2 |

Consider a database that has the relation schemas EMP(EmpId, EmpName, DepId) and
DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation
EMP. Consider the following queries on the database expressed in tuple relational calculus.

Which of the above queries are safe?

Which of the above queries are safe?

(I) and (II) only | |

(I) and (III) only | |

(II) and (III) only | |

(I), (II) and (III) |

Question 2 Explanation:

Question 3 |

Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider
the following queries on the database:

I.\pi _{R-S}(r)-\pi_{R-S}(\pi_{R-S}(r) \times S -\pi_{R-S,S}(r))

II.\{t|t\in \pi _{R-S}(r)\wedge \forall u \in s (\exists v \in r(u=v[s]\wedge t=v[R-S]))\}

III.\{t|t\in \pi _{R-S}(r)\wedge \forall v\in r(\exists u\in s(u=v[s]\wedge t=v[R-S]))\}

IV. Select R.a, R.b From R,S Where R.c=S.c

Which of the above queries are equivalent?

I.\pi _{R-S}(r)-\pi_{R-S}(\pi_{R-S}(r) \times S -\pi_{R-S,S}(r))

II.\{t|t\in \pi _{R-S}(r)\wedge \forall u \in s (\exists v \in r(u=v[s]\wedge t=v[R-S]))\}

III.\{t|t\in \pi _{R-S}(r)\wedge \forall v\in r(\exists u\in s(u=v[s]\wedge t=v[R-S]))\}

IV. Select R.a, R.b From R,S Where R.c=S.c

Which of the above queries are equivalent?

I and II | |

I and III | |

II and IV | |

III and IV |

Question 3 Explanation:

Question 4 |

Which of the following tuple relational calculus expression(s) is/are equivalent to
\forall t \in r(P(t))?

I. \neg \exists t \in r(P(t))

II. \neg t \notin r(P(t))

III. \neg \exists t \in r(\neg P(t))

IV. \exists t \in r(\neg P(t))

I. \neg \exists t \in r(P(t))

II. \neg t \notin r(P(t))

III. \neg \exists t \in r(\neg P(t))

IV. \exists t \in r(\neg P(t))

I only | |

II only | |

III only | |

III and IV only |

Question 4 Explanation:

Question 5 |

Consider the relation employee(name, sex, supervisorName) with name as the
key. supervisorName gives the name of the supervisor of the employee under
consideration. What does the following Tuple Relational Calculus query produce?

Names of employees with a male supervisor. | |

Names of employees with no immediate male subordinates | |

Names of employees with no immediate female subordinates. | |

Names of employees with a female supervisor |

Question 5 Explanation:

Question 6 |

Which of the following relational query languages have the same expressive power?

I. Relational algebra

II. Tuple relational calculus restricted to safe expressions

III. Domain relational calculus restricted to safe expressions

I. Relational algebra

II. Tuple relational calculus restricted to safe expressions

III. Domain relational calculus restricted to safe expressions

II and III only | |

I and II only | |

I and III only | |

I, II and III |

Question 6 Explanation:

Question 7 |

The relational algebra expression equivalent to the following tuple calculus expression:

\left\{t \mid t \in r \land \left(t[A] = 10 \land t[B]=20\right)\right\} is

\left\{t \mid t \in r \land \left(t[A] = 10 \land t[B]=20\right)\right\} is

\sigma_{(A=10 \lor B=20)} (r) | |

\sigma_{(A=10)} (r) \cup \sigma_{(B=20)} (r) | |

\sigma_{(A=10)} (r) \cap \sigma_{(B=20)} (r) | |

\sigma_{(A=10)} (r) - \sigma_{(B=20)} (r) |

Question 7 Explanation:

Question 8 |

Which of the following relational calculus expressions is not safe ?

A | |

B | |

C | |

D |

Question 8 Explanation:

There are 8 questions to complete.

In tuple calculas, 3rd query is wrong it is equal to instead of not equal to.

Thank You Praful Sambhaji Rane,

We have updated it.