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

GATE 2010

82 questions

MCQ 821-mark 39 · 2-mark 43

Questions 51–55 of 82

Q51Relational Algebra2 marksMCQ−0.67 if wrong
The following functional dependencies hold for relations R(A, B, C) and S(B, D, E)

B →\rightarrowA,
A →\rightarrowC

The relation R contains 200tuples and the relation S contains 100tuples. What is the maximum number of tuples possible in the natural join R⋈\Join S?

Q52SQL1 markMCQ−0.33 if wrong
A relational schema for a train reservation database is given below
Passenger (pid, pname, age) Reservation (pid, class, tid) Table : Passenger Table : Reservation pidpnameAge 0'Sachin'65 1'Rahul'66 2'Sourav'67 3'Anil'69 pidclasstid 0'AC'8200 1'AC'8201 2'SC'8201 5'AC'8203 1'SC'8204 3'AC'8202
What pids are returned by the following SQL query for the above instance of the tables?
 SELECT pid
FROM Reservation
WHERE class = 'AC' AND
     EXISTS (SELECT *
                      FROM Passenger
                      WHERE age > 65 AND
                      Passenger.pid = Reservation.pid) 

Q53Transaction2 marksMCQ−0.67 if wrong
Consider the following schedule for transactions T1, T2 and T3:
T1 T2 T3 Read ( X ) Read ( Y ) Read ( Y ) Write ( Y ) Write ( X ) Write ( X ) Read ( X ) Write ( X )
Which one of the schedules below is the correct serialization of the above?

Q54Transaction1 markMCQ−0.33 if wrong
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking
II. Time-stamp ordering

Q55Network Layer Protocol2 marksMCQ−0.67 if wrong
Consider a network with 6 routers R1 to R6 connected with links having weights as shown in the following diagram
R1 R2 R4 R6 R3 R5 6 7 8 3 2 1 4 9
Suppose the weights of all unused links in the previous question (R1-R2 and R4-R6, which carry no data with the weights shown) are changed to 2 and the distance vector algorithm is used again until all routing tables stabilize. How many links will now remain unused?