GATE 2008 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2008

185 questions

MCQ 1851-mark 52 · 2-mark 133

Questions 151–155 of 185

Q151ER Model2 marksMCQ−0.67 if wrong
Consider the following ER diagram
M1 M2 M3 P1 P2 N1 N2 M P N R1 R2
Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent M, N, P, R1, R2?

Q152ER Model2 marksMCQ−0.67 if wrong
Consider the following ER diagram
M1 M2 M3 P1 P2 N1 N2 M P N R1 R2
The minimum number of tables needed to represent M, N, P, R1, R2 is

Q153Relational Algebra2 marksMCQ−0.67 if wrong
Consider the following relational schema:
Student(school-id,sch-roll-no,sname,saddress)
School(school-id,sch-name,sch-address,sch-phone)
Enrolment(school-id,sch-roll-no,erollno,examname)
ExamResult(erollno,examname,marks) 

Consider the following tuple relational calculus query.
{t∣∃E∈ Enrolment t=E .school-id ∧∣{x∣x∈ Enrolment ∧x. school-id =t∧(∃B∈ ExamResult B. erollno =x. erollno ∧B examname =x. examname ∧B. marks >35)}∣÷∣{x∣x∈ Enrolment ∧x. school-id =t}∣∗100>35}\begin{array}{l} \{t \mid \exists E \in \text { Enrolment } t=E \text { .school-id } \\ \wedge \mid\{x \mid x \in \text { Enrolment } \wedge x . \text { school-id }=t \wedge(\exists B \in \text { ExamResult } B . \text { erollno }=x . \text { erollno } \wedge B \\ \text { examname }=x . \text { examname } \wedge B . \text { marks }\gt 35)\}|\div|\{x \mid x \in \text { Enrolment } \wedge x . \text { school-id }=t\} \mid \\ * 100\gt 35\} \end{array}

If a student needs to score more than 35 marks to pass an exam, what does the query return?

Q154Relational Algebra2 marksMCQ−0.67 if wrong
Let R and S be two relations with the following schema

R (P‾,Q‾\underline{P},\underline{Q},R1,R2,R3)

S (P‾,Q‾\underline{P},\underline{Q},S1,S2)

Where {P, Q} is the key for both schemas. Which of the following queries are equivalent?

I. ΠP(R⋈S)\Pi _{P}(R\Join S)
II. Πp(R)⋈ΠP(S)\Pi _{p}(R)\Join \Pi _{P}(S)
III. ΠP(ΠP,Q(R)∩ΠP,Q(S))\Pi _{P}(\Pi _{P,Q}(R)\cap \Pi _{P,Q}(S))
IV. ΠP(ΠP,Q(R)−(ΠP,Q(R)−ΠP,Q(S)))\Pi _{P}(\Pi _{P,Q}(R)-(\Pi _{P,Q}(R)-\Pi _{P,Q}(S)))

Q155Tuple Calculus1 markMCQ−0.33 if wrong
Which of the following tuple relational calculus expression(s) is/are equivalent to ∀t∈r(P(t))\forall t \in r(P(t))?
I. ¬∃t∈r(P(t))\neg \exists t \in r(P(t))
II. ¬t∉r(P(t))\neg t \notin r(P(t))
III. ¬∃t∈r(¬P(t))\neg \exists t \in r(\neg P(t))
IV. ∃t∈r(¬P(t))\exists t \in r(\neg P(t))