CS FundamentalsVery hardGATE CS (PYQ pattern)
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 empty buckets). Hash values (6-bit) are inserted in this order: 101100, 001100, 110100, 000100, 100000, 111001, 010101. What are the final global depth and number of buckets?
- A. global depth 5, 5 buckets
- B. global depth 4, 5 buckets
- C. global depth 4, 6 buckets
- D. global depth 3, 4 buckets
Correct answer: B. global depth 4, 5 buckets
Five of the values end in 00 (…100, …100, …100, …100, …000): they keep splitting until they are separated by their low bits, which forces the directory to grow; simulating each split gives the stated depth and bucket count.
More DBMS and SQL questions
- 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…
- F = {A→B, B→C, AC→D, D→A} on R(A, B, C, D). Which of the following FD sets is equivalent to F (has exactly the same closure)?
- R(A, B, C, D, E) has FDs A → B, BC → D, D → E. How many of these four binary decompositions are lossless-join? (1) (A, B, C) and (C, D, E)…