CS FundamentalsHardGATE CS
R(S, C) = {(1, a), (1, b), (2, a), (3, a), (3, b), (3, c), (4, b)}. What is R ÷ π_C(σ_{S = 1}(R))?
- A. {3}
- B. {1, 3}
- C. {1, 2, 3, 4}
- D. {1, 2, 3}
Correct answer: B. {1, 3}
The divisor is the set of C values of S = 1, i.e. {a, b}. Division keeps every S paired with both a and b: 1 and 3. Student 3 also has c, which does not matter.
More DBMS and SQL questions
- An ER diagram has entity Employee (key eid, composite attribute name, multivalued attribute phone), weak entity Dependent (partial key…
- A ternary relationship Supplies links Supplier, Part and Project, and the rule is: for a given project and part there is at most one…
- The system crashes after the last record of this log (immediate modification; <Ti, X, old, new>; at the checkpoint all dirty pages were…
- A buffer manager uses NO-STEAL (pages with uncommitted changes are never written to disk) and FORCE (all pages a transaction changed are…
- T1 reads the balance of account 7, then T2 updates that same row and commits, then T1 reads the row again and sees a different value. No…
- No transaction has committed. T1 writes A; T2 reads A and writes B; T3 reads B; T4 reads C, which only T5 wrote; T5 reads nothing written…