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

GATE 2008

185 questions

MCQ 1851-mark 52 · 2-mark 133

Questions 156–160 of 185

Q156SQL2 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) 

What does the following SQL query output?
SELECT	sch-name, COUNT (*)
FROM	School C, Enrolment E, ExamResult R
WHERE	E.school-id = C.school-id
AND
E.examname = R.examname AND E.erollno = R.erollno
AND
R.marks = 100 AND S.school-id IN (SELECT school-id
                                FROM student
                                GROUP BY school-id
                                 HAVING COUNT (*) > 200)
GROUP By school-id

Q157Normal Form2 marksMCQ−0.67 if wrong
Let R (A, B, C, D, E, P, G) be a relational schema in which the following functional dependencies are known to hold:
AB→CD,DE→P,C→E,P→CAB \to CD, DE \to P, C \to E, P \to C and B→GB \to G.
The relational schema R is

Q158Normal Form2 marksMCQ−0.67 if wrong
Let R(A,B,C,D)R (A, B, C, D) be a relational schema in which the following functional dependencies are known to hold:
A→B,  B→C,  C→DA \to B, \; B \to C, \; C \to D and D→BD \to B.
The decomposition of RR into (A,B),(B,C),(B,D)(A,B), (B,C), (B,D)

Q159Normal Form2 marksMCQ−0.67 if wrong
Consider the following relational schemes for a library database:

Book (Title, Author, Catalog_ no, Publisher, Year, Price)
Collection (Title,Author, Catalog_ no)

with in the following functional dependencies:

I. Title Author →\rightarrow Catalog_no
II. Catalog_no →\rightarrow Title Author Publisher Year
III. Publisher Title Year →\rightarrow Price

Assume {Author, Title} is the key for both schemes. Which of the following statements is true?

Q160File System2 marksMCQ−0.67 if wrong
Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size 6 bytes. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is built on the key field of the file, and a multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively