GATE 2018
65 questions
MCQ 41 · NAT 241-mark 30 · 2-mark 35
Questions 21–25 of 65
In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in R and that the cardinality of E1 is greater than the cardinality of E2.
Which one of the following is true about R?
Which one of the following is true about R?
Answer: (A)
R is many-to-one from E1 to E2. So each entity in E1 is linked to at most one entity in E2. E1 takes part totally, so each entity in E1 is linked to at least one entity in E2. Together, every entity in E1 is linked to exactly one entity in E2. E1 has more entities than E2, so an entity in E2 may be linked to several entities in E1.
Answer: Every entity in E1 is associated with exactly one entity in E2
Answer: Every entity in E1 is associated with exactly one entity in E2
Consider the following two tables and four queries in SQL.
Book (isbn, bname), Stock (isbn, copies)
Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?
Book (isbn, bname), Stock (isbn, copies)
Query 1: SELECT B.isbn, S.copies
FROM Book B INNER JOIN Stock S
ON B.isbn = S.isbn;
Query 2: SELECT B.isbn, S.copies
FROM Book B LEFT OUTER JOIN Stock S
ON B.isbn = S.isbn;
Query 3: SELECT B.isbn, S.copies
FROM Book B RIGHT OUTER JOIN Stock S
ON B.isbn = S.isbn;
Query 4: SELECT B.isbn, S.copies
FROM Book B FULL OUTER JOIN Stock S
ON B.isbn = S.isbn; Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?
Answer: (D)
Let us look at each query:
- Query 1 (inner join): gives only the matching rows.
- Query 2 (left outer): gives the matching rows and the Book rows with no match.
- Query 3 (right outer): gives the matching rows and the Stock rows with no match.
- Query 4 (full outer): gives the matching rows and the unmatched rows of both tables, so it always holds the other three.
Answer: Query 4
- Query 1 (inner join): gives only the matching rows.
- Query 2 (left outer): gives the matching rows and the Book rows with no match.
- Query 3 (right outer): gives the matching rows and the Stock rows with no match.
- Query 4 (full outer): gives the matching rows and the unmatched rows of both tables, so it always holds the other three.
Answer: Query 4
Match the following:
Answer: (C)
Let us go through each item one by one:
- UDP port number is 16 bits (IV)
- Ethernet MAC address is 48 bits (I)
- IPv6 Next Header field is 8 bits (II)
- TCP sequence number is 32 bits (III)
Answer: P-IV, Q-I, R-II, S-III
- UDP port number is 16 bits (IV)
- Ethernet MAC address is 48 bits (I)
- IPv6 Next Header field is 8 bits (II)
- TCP sequence number is 32 bits (III)
Answer: P-IV, Q-I, R-II, S-III
Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that stands for the TCP congestion window and MSS denotes the Maximum Segment Size.
(i) The cwnd increases by 2 MSS on every successful acknowledgment.
(ii) The cwnd approximately doubles on every successful acknowledgement.
(iii) The cwnd increases by 1 MSS every round trip time.
(iv) The cwnd approximately doubles every round trip time.
Which one of the following is correct?
(i) The cwnd increases by 2 MSS on every successful acknowledgment.
(ii) The cwnd approximately doubles on every successful acknowledgement.
(iii) The cwnd increases by 1 MSS every round trip time.
(iv) The cwnd approximately doubles every round trip time.
Which one of the following is correct?
Answer: (C)
During slow start, each ACK raises cwnd by 1 MSS. Within one RTT, the ACKs for a whole window of segments arrive, so cwnd roughly doubles every RTT. This means only (iv) is correct.
Answer: Only (iv) is true
Answer: Only (iv) is true
Two people, P and Q, decide to independently roll two identical dice, each with 6 faces, numbered 1 to 6. The person with the lower number wins. In case of a tie, they roll the dice repeatedly until there is no tie. Define a trial as a throw of the dice by P and Q. Assume that all 6 numbers on each dice are equi-probable and that all trials are independent. The probability (rounded to 3 decimal places) that one of them wins on the third trial is
Answer: 0.021 to 0.024
The chance of a tie in one trial is . One of them wins on the 3rd trial when the first two trials are ties and the third trial is not a tie:
Answer: 0.023
Answer: 0.023