CS FundamentalsVery hardGATE CS · Product placement
A file has 20,000 records of 80 bytes stored unspanned in 512-byte blocks, NOT ordered on attribute X. A dense secondary index on X (a candidate key) has one entry per record: a 10-byte key and a 6-byte record pointer. Searching by binary search on the index plus one data-block read needs how many block accesses in the worst case?
- A. 11
- B. 8
- C. 1667
- D. 10
Correct answer: A. 11
Dense index: 20,000 entries, ⌊512/16⌋ = 32 per block, so 625 index blocks; ⌈log₂ 625⌉ = 10, +1 data block = 11. (A linear scan of the file would average about 1,667 blocks.)
More DBMS and SQL questions
- R(A, B) has 250 tuples and S(B, C) has 60 tuples, where B is the primary key of R and also the primary key of S. What are the minimum and…
- R(A, B, C, D, E, F) has functional dependencies C → F, D → AC, A → B, F → D. Which of these attribute sets is NOT a superkey of R?
- Table Score(name, pts) rows: ('a', 90), ('b', 85), ('c', 90), ('d', 70), ('e', 85), ('f', 60). In this query's output, what are (r, dr)…
- R(A, B, C, D, E, F) has the set of functional dependencies Σ = {A → D, E → C, AE → CD, F → B, B → F}. Which of the following FDs is NOT in…
- R(A, B, C, D) has functional dependencies D → AB, A → BC. What is the highest normal form R satisfies?
- A B+ tree index uses 512-byte blocks, 8-byte search keys, 4-byte block pointers and 6-byte record (data) pointers. Each leaf also keeps…