CS FundamentalsHardGATE CS · DBMS
A bitmap index is built on an attribute with 4 distinct values over a table of 1,000,000 rows (uncompressed, one bit per row per value). What is the total size of the bitmaps?
- A. 125,000 bytes (1,000,000 bits)
- B. 500,000 bytes (4,000,000 bits)
- C. 4,000,000 bytes
- D. 250,000 bytes (2,000,000 bits)
Correct answer: B. 500,000 bytes (4,000,000 bits)
There is one bitmap per distinct value, each with one bit per row: 4 × 1,000,000 = 4,000,000 bits = 500,000 bytes. Using 2 bits per row (log₂ 4) is an encoded index, not a bitmap index.
More DBMS and SQL questions
- Classify the schedule R2(A), W2(B), C2, W1(B), R1(A), C1 (Ci = commit of Ti) by the strongest property it satisfies.
- Table Sale(id, rep, region, amt) rows: (1, 'Ira', 'N', 100), (2, 'Jai', 'S', 250), (3, 'Ira', 'S', NULL), (4, 'Kim', 'N', 300), (5, 'Jai'…
- A file has 120,000 records of 150 bytes, stored unspanned in 4096-byte blocks and ordered on key K. A primary (sparse) index on K has one…
- Employee(eid, name) has a recursive one-to-many relationship 'manages' (a manager manages many employees; each employee has at most one…
- In logical query processing order, which clause of a SELECT statement is evaluated LAST?
- R(A, B, C, D, E, F) has FDs C → AD, EF → C, B → A, AD → E. Each option is a relation schema obtained by projecting R, with the…