1
GATE CSE 2011
MCQ (Single Correct Answer)
+2
-0.6

Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X = 1, Y = 1) is inserted in the table.

Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX + 1, 2*MY + 1 respectively. It may be noted that each time after the insertion, values of MX and MY change.

What will be the output of the following SQL query after the steps mentioned above are carried out?

SELECT Y FROM T WHERE X=7; 
A
127
B
255
C
129
D
257
2
GATE CSE 2009
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relational schema:

Suppliers(sid : integer, sname : string, city : string, street : string)

Parts(pid : integer, pname : string, color : string)

Catalog(sid : integer, pid : integer, cost : real)

Consider the following relational query on the above database:
SELECT S.sname 
FROM Suppliers S 
WHERE S.sid NOT IN 
     (SELECT C.sid 
      FROM Catalog C 
      WHERE C.pid NOT IN 
        (SELECT P.pid 
         FROM Parts P 
         WHERE P.color<> 'blue'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
A
Find the names of all suppliers who have supplied a non-blue part.
B
Find the names of all suppliers who have not supplied a non-blue part.
C
Find the names of all suppliers who have supplied only blue parts.
D
Find the names of all suppliers who have not supplied only blue parts.
3
GATE CSE 2009
MCQ (Single Correct Answer)
+2
-0.6
Consider the following relational schema:

Suppliers(sid : integer, sname : string, city : string, street : string)

Parts(pid : integer, pname : string, color : string)

Catalog(sid : integer, pid : integer, cost : real)

Assume that, in the suppliers relation above, each supplier and each street within a city has a unique name, and (sname, city) forms a candidate key. No other functional dependencies are implied other than those implied by primary and candidate keys. Which one of the following is TRUE about the above schema?
A
The schema is in BCNF
B
The schema is in 3NF but not in BCNF
C
The schema is in 2NF but not in 3NF
D
The schema is not in 2NF
4
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6

Consider The Following Relational Scheme

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 ∈ ExamResult B.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 }
If a student needs to score more than 35 marks to pass an exam what does the query return?
A
The empty set
B
Schools with more than 35% of it's student 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.
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12