CS FundamentalsHardGATE CS · PSU (ISRO/BARC)
R(A, B) = {(1, 1), (1, 3), (3, 1), (3, 2), (3, 3)} and S(B, C) = {(1, 5), (2, 5), (2, 6), (2, 7), (4, 6)}. How many tuples are in π_A(R ⋈ S) and in R ⋈ S respectively (set semantics)?
- A. 2 and 25
- B. 2 and 6
- C. 2 and 5
- D. 5 and 5
Correct answer: C. 2 and 5
R ⋈ S pairs each R tuple with every S tuple having the same B: 5 tuples. Projecting on A removes duplicates, leaving {1, 3}.
More DBMS and SQL questions
- R(A, B, C, D, E, F) has functional dependencies AE → F, A → BCD, F → B. What is the closure {AC}⁺?
- Assertion (A): For every relation schema there is a decomposition into 3NF relations that is lossless and dependency preserving. Reason…
- Σ = {A → D, AB → E, B → C, C → BE}. Consider the FD AB → E while computing a canonical cover. Which statement about extraneous attributes…
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- R(A, B, C, D, E) has functional dependencies A → DE, C → AD, AD → C, E → AC. Which of the following is the complete set of candidate keys…
- Keys 4, 38, 33, 56, 40, 14, 54 are inserted in this order into an empty B+ tree where a node holds at most 2 keys; an overflowing leaf…