0% found this document useful (0 votes)
8 views12 pages

FS Mod4

file structure module 4 ppt

Uploaded by

chayashreeg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

FS Mod4

file structure module 4 ppt

Uploaded by

chayashreeg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Indexed Sequential

File Access and


Prefix B+ trees
• Sequence set based on the idea of grouping the records into blocks and then
maintaining the blocks view each block as containing a range of records

• If file contains so many blocks that the block index does not fit into memory.
Solution: PAGES -> B-tree structure
The use B-tree index for sequence set of blocks leads an hybrid structure called as B+
tree
• Content of Index are separator instead of keys.

• Separators do not need to have actual keys in the index set can save
space by placing the shortest separator in the index structure
• Separator can be treated as variable-length entities within index structure
save space by placing the shortest separator in the index structure
The simple prefix B+ Tree
• B-tree index is called index set combined together with sequence set, forms
a file structure called a simple prefix B+ tree.
• Simple prefix => shortest separator rather than actual keys
Simple prefix B+ tree Maintenance
• Deletions on the sequence set delete the records for EMBRY and FOLKS
limited to changes within blocks
• Insertion of EATON to tree makes tree remain unchanged.
• Consider B-tree order is three and so need maximum 2 seperators.
• Insertion in block 1 => split
• Deletion of a record from block 2 of the sequence set cause an underflow
condition in the sequence set need a concatenation of blocks 2 and 3
• Have to remove block 3 and remove the separator CAM cause an underflow
in the index set node => merging need a concatenation of index nodes
• Bring BO back down from the root
Index Set Block Size
• Common block size for the index and sequence sets
• the block size that is best for the sequence set is usually best for the
index set
• a common block size makes it easier to implement a buffering scheme
to create a virtual simple prefix B+ tree
• use of one file for both kinds of blocks is simpler if the block sizes are
the same
Internal Structure of Index Set
Blocks: A Variable-Order B-Tree
• Variable-length separators and corresponding index

• Index set block needs to store references(called a relative block


number(RBN)) to its children
• combining the list of separators, index to separators, and list of RBNs into a
single index set block.

• separator count to find the middle element in the index to the separators
for binary search
• total length of separators is a list of merged separators varies in length from
block to block Separators and relative block numbers

You might also like