CS FundamentalsHardGATE CS (PYQ pattern) · Product Company SDE
Relation R has 8000 tuples with 50 distinct values of the join attribute A, and S has 3600 tuples with 340 distinct values of A. Using the standard estimate, how many tuples does R ⋈ S have?
- A. 67,764.7
- B. 1,01,647.1
- C. 84,705.9
- D. 2,88,00,000
Correct answer: C. 84,705.9
Size ≈ |R||S| / max(V(A,R), V(A,S)) = 8000×3600/340 = 84,705.9. Dividing by the min overestimates.
More DBMS and SQL questions
- Relation R has 10000 tuples with 470 distinct values of the join attribute A, and S has 5200 tuples with 100 distinct values of A. Using…
- Relation R has 6000 tuples with 160 distinct values of the join attribute A, and S has 4400 tuples with 390 distinct values of A. Using…
- A B-tree node must fit in a 2048-byte block; each key takes 12 bytes and each child pointer 8 bytes. What is the maximum order p (maximum…
- R(A, B, C, D) has functional dependencies A → B, C → D. What are the candidate key(s) of R?
- R(A, B, C, D) has functional dependencies A → B, C → D, giving candidate key(s) AC. How many superkeys does R have in total?
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A. What are the candidate key(s) of R?