CS FundamentalsEasyGATE CS (PYQ pattern)
Block nested-loop join of R (800 pages) and S (300 pages) with 52 buffer pages (1 for the inner input, 1 for output, 50 for the outer block). Ignoring the cost of writing the result, what is the minimum number of page reads over the two choices of outer relation?
- A. 5600
- B. 1100
- C. 4800
- D. 5100
Correct answer: D. 5100
R outer: 800 + ceil(800/50) x 300 = 5600. S outer: 300 + ceil(300/50) x 800 = 5100. The smaller relation as outer is better: 5100.
More DBMS and SQL questions
- R(A, B) has 10,000 tuples with V(R, B) = 200; S(B, C) has 5,000 tuples with V(S, B) = 500 and V(S, C) = 100; T(C, D) has 2,000 tuples with…
- An extendible hash index uses the LOW-order bits of the hash value, with bucket capacity 2 and an initial directory of global depth 1 (two…
- A file of 100,000 records of 120 bytes is stored in 4096-byte blocks, each with an 8-byte header (records do not span blocks), sorted on…
- R(A, B, C, D, E) has the functional dependencies DB → A, A → C, D → C, C → B. R is decomposed and one fragment is R1(A, C, D). Counting…
- R(A, B, C, D, E) has FDs A → B, BC → D, D → E, E → B. Which of the following are implied? I. AC → D II. A → E III. AC → E IV. D → B V. CD…
- R(A, B, C, D, E, F) has the functional dependencies B → C, FE → D, EF → B, E → A, CF → E. How many attributes of R are prime (belong to at…