Learning objectives
What you will be able to explain
- Bitmap index matching (students relation)
- Sparse index size (first level)
- Second-level sparse index size
- Extensible hashing after inserting key 1000
- When inserting a key into a full block of an extensible hash table, if a bucket's local depth is less than global depth, the directory doubles in size.
- Which of the following statements is true? (B vs B+ Trees)
Section 01
Bitmap index matching (students relation) to Second-level sparse index size
01
Bitmap index matching (students relation)
Guided checkpoint
Consider relation students(studentID, degree, courseID) with bitmap indexes on degree and courseID:
Bitmap index on degree:
ISM: 010101
CS: 101010
Bitmap index on courseID:
DBT: 101000
DBTLAB: 010010
ROC: 000100
DW: 000001Option A
| studentID | degree | courseID |
|---|---|---|
| 1 | CS | DBT |
| 2 | ISM | DBTLAB |
| 3 | CS | ROC |
| 4 | ISM | DBT |
| 5 | ISM | DBTLAB |
| 6 | ISM | DW |
Option B
| studentID | degree | courseID |
|---|---|---|
| 1 | CS | DBT |
| 2 | ISM | DBTLAB |
| 3 | CS | DW |
| 4 | ISM | DBT |
| 5 | ISM | DBTLAB |
| 6 | ISM | ROC |
Option C
| studentID | degree | courseID |
|---|---|---|
| 1 | CS | DBT |
| 2 | ISM | DBTLAB |
| 3 | CS | DBT |
| 4 | ISM | ROC |
| 5 | CS | DBTLAB |
| 6 | ISM | DW |
Option D
| studentID | degree | courseID |
|---|---|---|
| 1 | CS | DBT |
| 2 | ISM | DBTLAB |
| 3 | CS | ROC |
| 4 | ISM | DBT |
| 5 | CS | DBTLAB |
| 6 | ISM | DW |
Which table matches these bitmap indexes?
02
Sparse index size (first level)
Guided checkpoint
Given the following properties:
- Data file: 10 million tuples, each tuple requires 512 bytes
- Disk block size: 8192 bytes
- Index entry: search key 4 bytes + pointer 8 bytes
- Index entries do not span blocks
How many blocks are required to store this sparse index? (Give your answer as a single integer.)
03
Second-level sparse index size
Guided checkpoint
Given the following properties:
- Data file: 10 million tuples, each tuple requires 512 bytes
- Disk block size: 8192 bytes
- Index entry: search key 4 bytes + pointer 8 bytes
- Index entries do not span blocks
How many blocks are required to store a second-level sparse index if the first-level index is also sparse?
Section 02
Extensible hashing after inserting key 1000 to Which of the following statements is true? (B vs B+ Trees)
01
Extensible hashing after inserting key 1000
Guided checkpoint
Consider this extensible hash table:
- Bucket capacity: 4 records
- Current global depth i = 1
- Directory 0 -> bucket (local depth 1): 0010, 0101, 0011, 0110
- Directory 1 -> bucket (local depth 1): 1010, 1110, 1001, 1011
Insert key 1000. Which resulting configuration is correct?
02
When inserting a key into a full block of an extensible hash table, if a bucket's local depth is less than global depth, the directory doubles in size.
03
Which of the following statements is true? (B vs B+ Trees)
Guided checkpoint
Mark each statement as True or False.
Section 03
A B+ tree always has a fixed height . Deleting a value from a B+ tree cannot change its height. to Grid file bucket count after split
01
A B+ tree always has a fixed height . Deleting a value from a B+ tree cannot change its height.
02
Dense index size calculation
Guided checkpoint
Given the following properties of the data file, disk, and index structures:
- Data file: 10 million tuples, each tuple requires 2048 bytes
- Disk block size: 4096 bytes
- Index: search key size 8 bytes, pointer size 12 bytes
- Index entries do not span blocks
How many blocks are required to store this dense index? (single integer)
03
Grid file bucket count after split
Guided checkpoint
Given fact table Clicks(User, Session, Page, Position) with a grid file partitioned as:
- User: 4 partitions
- Session: 3 partitions
- Page: 9 partitions
After ingesting more data, one partition of the Page dimension is split. How many buckets now exist in total?
Section 04
Hash index query support to B+ tree deletion: delete key 22
01
Hash index query support
Guided checkpoint
Select the type of queries efficiently supported by a hash index on attribute .
02
In a highly selective query, only a few elements qualify under the selection; most elements are discarded.
Guided checkpoint
(Note: Selectivity refers to the property of the index or query.)
03
B+ tree deletion: delete key 22
Guided checkpoint
Consider the B+ tree below with the following properties:
- Each node (except root) contains keys.
- Inner nodes: keys in subtree below pointer are less than key ; keys below pointer are greater or equal than key .
- Delete operation first tries to steal from a direct sibling (first right sibling, then left sibling). If stealing is not possible, nodes merge (first with right sibling, then left sibling).
- Leaf pointers in leaves point to row IDs; pointer points to next leaf.

Which of the following choices represents the B+ tree after deletion of key 22?
Section 05
B+ tree insertion: insert key 43 to If a data table has one attribute with normal distribution, the quad-tree resulting from this data table will be balanced.
01
B+ tree insertion: insert key 43
Guided checkpoint
Consider the B+ tree below with the following properties:
- Each node (except the root) contains keys.
- Inner nodes: keys in the subtree below pointer are less than key ; keys below pointer are greater or equal than key .
- Insert operations may trigger node splits but no shifting of keys into neighboring leaves.
- When a node is split, the middle key is moved to the parent node.
- Pointers in leaves point to row IDs. Pointer points to the next leaf.

Which of the following choices represents the B+ tree after insertion of key 43?
02
Linear hashing adds an overflow bucket when the fill rate is exceeded during insertion.
03
If a data table has one attribute with normal distribution, the quad-tree resulting from this data table will be balanced.
Section 06
Query type classification to A sparse index has an entry for every row in the table and therefore needs less space than a dense index.
01
Query type classification
Guided checkpoint
Consider relation Customer(Age, Gender, PostalCode, City, TotalSpent).
The following query:
SELECT *
FROM Customer
WHERE PostalCode = 10629is an example of:
02
Partitioned hashing: buckets checked for partial match on a
Guided checkpoint
Consider relation R(a, b, c, d) stored using partitioned hashing:
- Total buckets: 65536 (16-bit hash function)
- Bit allocation: 4 bits for a, 5 bits for b, 3 bits for c, 4 bits for d
How many buckets must be checked for a partial match query on a?
Example:
SELECT *
FROM R
WHERE a = 'y';03
A sparse index has an entry for every row in the table and therefore needs less space than a dense index.
Section 07
kd-tree partitions
01
kd-tree partitions
Guided checkpoint
Given the following kd-tree, choose the corresponding partitions.

Knowledge check
Turn understanding into recall.
The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.