GATE 2014 (Session 1)
65 questions
MCQ 40 · NAT 251-mark 30 · 2-mark 35
Questions 31–35 of 65
Consider the relation scheme R = (E, F, G, H, I, J, K, L, M, N) and the set of functional dependencies
{{E,F}{G}, {F}{I,J}, {E,H}{K,L}, {K}{M}, {L}{N} } on R. What is the key for R?
{{E,F}{G}, {F}{I,J}, {E,H}{K,L}, {K}{M}, {L}{N} } on R. What is the key for R?
Answer: (B)
The attributes E, F and H never appear on the right side of any dependency. So no dependency can give them, and every key must contain E, F and H.
Take the closure . Start with :
- adds G.
- adds I and J.
- adds K and L.
- adds M.
- adds N.
So , which is all ten attributes. So {E, F, H} is a key, and it is minimal because every key must contain all three of E, F and H.
{E, F} and {E} leave out H, so they cannot be keys. {E, F, H, K, L} is a superkey but not minimal.
Answer: (B)
Take the closure . Start with :
- adds G.
- adds I and J.
- adds K and L.
- adds M.
- adds N.
So , which is all ten attributes. So {E, F, H} is a key, and it is minimal because every key must contain all three of E, F and H.
{E, F} and {E} leave out H, so they cannot be keys. {E, F, H, K, L} is a superkey but not minimal.
Answer: (B)
Given the following statements:
S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL
S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition.
CREATE TABLE S (
a INTEGER,
d INTEGER,
e INTEGER,
PRIMARY KEY (d),
FOREIGN KEY (a) references R)
Which one of the following statements is CORRECT?
S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL
S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition.
CREATE TABLE S (
a INTEGER,
d INTEGER,
e INTEGER,
PRIMARY KEY (d),
FOREIGN KEY (a) references R)
Which one of the following statements is CORRECT?
Answer: (D)
Let us check each statement:
- S1: A CHECK constraint cannot always take the place of a foreign key. It cannot easily refer to another table, and it cannot handle updates and deletes so S1 is FALSE.
- S2: The primary key of R is (a, b), so a foreign key has to refer to both columns. FOREIGN KEY (a) references R is not valid so S2 is FALSE.
Answer: Both S1 and S2 are FALSE
- S1: A CHECK constraint cannot always take the place of a foreign key. It cannot easily refer to another table, and it cannot handle updates and deletes so S1 is FALSE.
- S2: The primary key of R is (a, b), so a foreign key has to refer to both columns. FOREIGN KEY (a) references R is not valid so S2 is FALSE.
Answer: Both S1 and S2 are FALSE
Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links
[S1] The computational overhead in link state protocols is higher than in distance vector protocols.
[S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol.
[S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.
Which one of the following is correct about S1, S2, and S3?
[S1] The computational overhead in link state protocols is higher than in distance vector protocols.
[S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol.
[S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.
Which one of the following is correct about S1, S2, and S3?
Answer: (D)
Let us check the three statements one by one:
- S1: In link state, every router runs Dijkstra on the full topology so it needs more computation. True
- S2: Split horizon cannot stop every loop, because count-to-infinity can still occur. Link state avoids persistent loops. So the statement is False
- S3: In link state, routers flood updates and recompute right away so convergence is faster. True
Answer: S1 and S3 are true, but S2 is false
- S1: In link state, every router runs Dijkstra on the full topology so it needs more computation. True
- S2: Split horizon cannot stop every loop, because count-to-infinity can still occur. Link state avoids persistent loops. So the statement is False
- S3: In link state, routers flood updates and recompute right away so convergence is faster. True
Answer: S1 and S3 are true, but S2 is false
Which one of the following are used to generate a message digest by the network security protocols?
(P) RSA
(Q) SHA-1
(R) DES
(S) MD5
(P) RSA
(Q) SHA-1
(R) DES
(S) MD5
Answer: (C)
Message digests come from hash functions. SHA-1 and MD5 are hash functions, so they produce message digests. RSA is a public-key encryption method. DES is a symmetric cipher.
Answer: Q and S only
Answer: Q and S only
Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.
1. The web browser requests a webpage using HTTP.
2. The web browser establishes a TCP connection with the web server.
3. The web server sends the requested webpage using HTTP.
4. The web browser resolves the domain name using DNS.
1. The web browser requests a webpage using HTTP.
2. The web browser establishes a TCP connection with the web server.
3. The web server sends the requested webpage using HTTP.
4. The web browser resolves the domain name using DNS.
Answer: (A)
First, the browser finds the address with DNS then it sets up a TCP connection then it sends the HTTP request and last, the server sends back the page.
Answer: 4, 2, 1, 3
Answer: 4, 2, 1, 3