1Z0-061 · Question #321
This statement will fail: create unique bitmap index on employees(department_id,hire_date); Why? (Choose the best answer.)
The correct answer is A. Bitmap indexes cannot be unique. See the full explanation below for the reasoning.
Question
This statement will fail:
create unique bitmap index on employees(department_id,hire_date); Why? (Choose the best answer.)
Options
- ABitmap indexes cannot be unique.
- BThe two columns are of different data types.
- CA bitmap index can be on only one column.
- DThere is already a B*Tree index on DEPARTMENT_ID.
How the community answered
(51 responses)- A75% (38)
- B8% (4)
- C4% (2)
- D14% (7)
Community Discussion
5A is the correct answer. Think of a bitmap index like a library card catalog where each drawer is labeled with a distinct value, and the cards inside point to every book with that value, which is a design built for low-cardinality columns where duplicates are expected and even necessary, so asking it to be "unique" is like asking a city bus to refuse passengers who share a destination, it defeats the entire purpose, and Oracle simply does not allow the UNIQUE keyword on a bitmap index, full stop.
A is correct, bitmap indexes simply do not support the UNIQUE constraint in Oracle, full stop. I actually froze on this one during my real exam because I half-remembered something about composite bitmap indexes being restricted, and I almost circled C before I caught myself and thought back to the study notes where we flagged this exact rule. Anyone else remember tripping on this, or did your group nail it on the first pass?
Anjali, you are dead right that bitmap indexes cannot enforce uniqueness, and the reason worth pinning to your memory is that bitmap indexes store one compressed bit-column per distinct value shared across many rows, so by their very design multiple rows map to the same entry, which is the exact opposite of what a unique constraint demands.
B for sure, mixing column data types is what breaks it.
Hey Nina, appreciate you jumping in, but this one lands on A, because the scenario is describing a structural issue with the query join path, not a data type conflict, and that distinction is what the question is really testing.