CS FundamentalsHardGATE CS
An extendible hash index has bucket capacity 2 and uses the low-order bits of the integer key as the hash value (the directory starts with global depth 0 and one bucket; an overflowing bucket is split and the directory is doubled only when the bucket's local depth equals the global depth). After inserting the keys 20, 3, 12, 28, 5, 13, 21, 45, 8, 52, 60, 37 in this order, what are the global depth and the number of distinct buckets?
- A. global depth 5, 12 buckets
- B. global depth 4, 10 buckets
- C. global depth 5, 10 buckets
- D. global depth 6, 11 buckets
Correct answer: C. global depth 5, 10 buckets
Simulating the splits (low-order bits, split by the next bit, directory doubling only when local depth equals global depth) ends with global depth 5 and 10 distinct buckets, so some directory entries share a bucket.
More DBMS and SQL questions
- A file of 32,000 pages is sorted with an external merge sort using 32 buffer pages: pass 0 produces sorted runs of 32 pages, and every…
- ARIES log: LSN1 T1 update P1; LSN2 T2 update P2; LSN3 T1 update P3; LSN4 begincheckpoint; LSN5 endcheckpoint with active transactions {T1…
- Sa(m, amt) holds monthly sales (2024-01, 100), (2024-02, 130), (2024-03, 130), (2024-04, 90), (2024-05, 150), (2024-06, 150), (2024-07…
- Table T(x) holds the values 1, NULL, 3, NULL, 3. What does SELECT COUNT(), COUNT(x), COUNT(DISTINCT x) FROM T return?
- Emp(n, dept, sal) has rows (A, d1, 40), (B, d1, 70), (C, d2, 45), (D, d2, 50), (E, d3, 80), (F, d3, 30), (G, d4, 60). How many rows does…
- Dept(d) has rows 1, 2, 3 and Emp(e, d) has rows (a, 1), (b, 1), (c, 2). How many rows does SELECT D.d FROM Dept D LEFT JOIN Emp E ON D.d =…