GATE 2006
191 questions
MCQ 1911-mark 191
Questions 166–170 of 191
.
Which of the following is a candidate key for R?
Answer: (B)
Closures:
- : gives ; then gives . So , and is a key. Its only smaller subset that holds is , which is not a key, so is minimal.
- Similarly and are keys (, , ).
The candidate keys are .
- (A) has no , so it is not a key.
- (C) and (D) are superkeys, but they contain the smaller key , so they are not minimal.
Answer: (B)
Answer: (C)
Block size bytes, block pointer bytes, search key bytes.
So the largest whole is 34. The 7-byte record pointer is used only in leaf nodes, so it does not enter this calculation.
Answer: (C)
1. T1 start
2. T1 B old = 12000 new = 10000
3. T1 M old = 0 new = 2000
4. T1 commit
5. T2 start
6. T2 B old = 10000 new = 10500
7. T2 commit
Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?
Answer: (B)
T1 has committed (record 4), so its changes, records 2 and 3, must be redone. A commit record only means the log is safe on disk. The updated data pages of T1 may still have been in memory when the system crashed (no checkpoint is shown), so recovery has to apply them again.
Why the other options are wrong:
- (A) is wrong because record 6 belongs to T2, which has not committed, so it is undone, not redone.
- (C) is wrong because a commit does not guarantee that the changes reached the data pages on disk, so redo is still needed.
- (D) is wrong because idempotent only means that repeating the same operation gives the same result. It does not mean an undo and a redo on the same item can be swapped. In general the last one applied decides the final value, so recovery applies them in a fixed order. (In this log both give B = 10000, but the rule does not rely on that.)
Answer: (B)
Answer: (A)
Duty cycle on : off , so a source is on for of the time. Its average rate is Mbps and its peak rate is 10 Mbps.
S1 (no buffer): nothing can be queued, so the link must carry the worst case, when all sources are on together: . With fewer than 10 sources, even this worst case would leave part of the link unused, so capacity is wasted. So .
S2 (large buffer): data that cannot be sent at once waits in the buffer, so only the average load must fit in the link, or the queue would grow without end: . Check for with all sources synchronized: during the on-time the input is Mbps and the link sends 100, so the buffer fills at 200 Mbps. During the off-time (twice as long) the link drains it at 100 Mbps. The two amounts are equal, so the buffer is empty again at the end of every cycle and nothing is lost. For 31 sources the average input is more than 100 Mbps and the buffer overflows. So .
Answer: (A)
Answer: (B)
(sum of an infinite GP, as )
With and : transmissions on average. (This is attempts per packet.)
Answer: (B)