CS FundamentalsHardGATE CS (PYQ pattern)
Tables ST(s, c) with rows (p,DB), (p,OS), (p,CN), (q,DB), (q,OS), (r,DB), (r,OS), (r,CN), (r,AI), (s,CN), (s,OS), (s,DB), (s,DB) and CR(c): DB, OS, CN. The relational-division result 'students who have taken every course in CR' is computed. Which students qualify?
- A. p, r, s
- B. p, r
- C. p, q, r
- D. p, s
Correct answer: A. p, r, s
p has all three; r has the three plus AI (extra courses do not disqualify); s has all three (DB twice is a duplicate); q misses CN.
More DBMS and SQL questions
- Edge table G(a, b): (1,2), (2,3), (3,1), (3,4), (4,5), (6,7). The recursive query WITH RECURSIVE R(x,y) AS (SELECT a,b FROM G UNION SELECT…
- Table M(g, v): (x,10), (x,NULL), (x,20), (y,NULL), (y,NULL), (z,30). How many groups does SELECT g FROM M GROUP BY g HAVING COUNT() >…
- O(oid, c): (1,100), (2,100), (3,200), (4,NULL). I(oid, p, q): (1,5,2), (1,6,1), (2,5,3), (3,7,1), (3,7,1), (9,1,1). C(c, n): (100,u)…
- Transaction T1 executes R1(A), W1(A), R1(B) and T2 executes W2(A), R2(B), W2(B), each in the stated order (no commits modelled). Among all…
- Consider the schedule R2(X), W1(X), W2(X), W2(Y), C2, R1(Y), C1, W3(X), R3(X), C3 (Ci is the commit of Ti). Which is the strongest…
- Schedule S: R1(X), W2(X), W2(Y), W1(Y), W3(X), W3(Y), R3(Y). Which statement is correct?