Menu
Database Management System (DBMS) GATE Question Answers with Explanation.
Q1 – Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery. Which of the following statements is/are correct?
Â
The same undo and redo list will be used while recovering again
The system cannot recover any further
All the transactions that are already undone and redone will not be recovered again
The database will become inconsistent
Ans – (1)
Explanation –
Q2 – A relation r(A,B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to 20. Assume that the attributes A and B are independently distributed. The estimated number of tuples in the output of σ(A>10)∨(B=18)(r) is ____________.
Ans – (819 to 820) OR (205)
Explanation –
Q3 – The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key:Â
Consider the following relational algebra expression:Â
What does the above expression generate?
Employee numbers of only those employees whose age is the maximum
Employee numbers of only those employees whose age is more than the age of exactly one other employee
Employee numbers of all employees whose age is not the minimum
Employee numbers of all employees whose age is the minimum.
Ans – (3)
Explanation –Â
Q4 – Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti.
Consider the following two schedules.
S1:Â r1(x)r1(y)r2(x)r2(y)w2(y)w1(x)
S2:Â r1(x)r2(x)r2(y)w2(y)r1(y)w1(x)
Â
Which one of the following options is correct?
Â
S1 is conflict serializable, and S2 is not conflict serializable.
S1 is not conflict serializable, and S2 is conflict serializable.
Both S1 and S2 are conflict serializable.
Neither S1 nor S2 is conflict serializable.
Ans – (2)
Explanation –Â
Q5 – Consider the relation R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies.Â
Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes.Â
Which one of the following options is correct?
D1 is a lossless decomposition, but D2 is a lossy decomposition
D1 is a lossy decomposition, but D2 is a lossless decomposition
Both D1 and D2 are lossless decompositions
Both D1 and D2 are lossy decompositions
Ans – (1)
Explanation –Â
Q6 – A TCP server application is programmed to listen on port number P on host S. A TCP client is connected to the TCP server over the network.
Consider that while the TCP connection was active, the server machine S crashed and rebooted.
Assume that the client does not use the TCP keepalive timer. Which of the following behaviours is/are possible?
Â
If the client was waiting to receive a packet, it may wait indefinitely
The TCP server application on S can listen on P after reboot
If the client sends a packet after the server reboot, it will receive a RST segment
If the client sends a packet after the server reboot, it will receive a FIN segment.
Ans – (1, 2, 3)
Explanation –Â
Q7 – Consider two hosts P and Q connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes, and between R and Q is 820 bytes. A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0×1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don’t Fragment (DF) flag in the IP header is not set by P. Which of the following statements is/are correct?
Â
Two fragments are created at R and the IP datagram size carrying the second fragment is 620 bytes.
If the second fragment is lost, R will resend the fragment with the IP identification value 0×1234.
If the second fragment is lost, P is required to resend the whole TCP segment.
TCP destination port can be determined by analysing only the second fragment.
Ans – (1, 3)
Explanation –Â