{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Tutorial4-sol - Problem 1 Indexing on Sequential Files...

This preview shows pages 1–3. Sign up to view the full content.

Problem 1: Indexing on Sequential Files Solution 1. 100 / 10 = 10 blocks. Explanation: A block can hold 10 key-pointer pairs, and we need a pair for every tuple. 100 tuples / 10 key-points pairs per block = 10 blocks. 2. (100 / 2) / 10 = 5 blocks. Explanation: A block can hold 10 key-pointer pairs, and we need a pair for every tuple that is the first in its block. Every block can hold 2 tuples. Therefore there are 100 / 2 = 50 tuples that need key-pointer pairs. Now, it's as if we're building a dense index on these 50 tuples, and 50 / 10 = 5 blocks. 3. Clustered index reorders the data, unclustered does not. So with unclustered index, can't have ordered tuples within blocks (because nothing is sorted). Therefore sparse index is impossible.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem 2: B+ Tree Solution 1. First valid answer (recommended): The following changes will be done to the original B-tree: Step 1. The first node in the leaf level split to two nodes: (1,2) and (4,5,6). Step 2. The first node in the second level split to two nodes (4,8) and (32,40).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}