CS FundamentalsHardGATE CS (PYQ pattern) · Product Company SDE
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 the standard estimate, how many tuples does R ⋈ S have?
- A. 10,400
- B. 1,65,000
- C. 423.1
- D. 67,692.3
Correct answer: D. 67,692.3
Size ≈ |R||S| / max(V(A,R), V(A,S)) = 6000×4400/390 = 67,692.3. Dividing by the min overestimates.
More DBMS and SQL questions
- 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?
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A, giving candidate key(s) AD, CD, DE. How many superkeys does R have in…
- R(A, B, C, D) has functional dependencies AB → C, C → D, D → A. What are the candidate key(s) of R?