TEXT   44

B tree

Guest on 22nd August 2022 01:43:59 PM

  1. B+ Trees
  2.  
  3. Introduction
  4. B+ Trees are one of the access methods that are available in Minibase. For a detailed discussion of B+ Trees and the search, insert and delete algorithms, see the text.
  5.  
  6.  
  7.  
  8. Design Decisions
  9. A few assumptions are made with respect to inserts and deletes in B+ Trees.
  10. On inserts,when a page becomes full it is split in such a way as to keep the resulting pages about half full, subject to the condition that all duplicates remain on the same page. (Two key/rid pairs are `duplicates' if they have the same key value.) In Minibase, we assume that there will never be more than a page full of index entries with the same key value.
  11.  
  12. Index entries are deleted without any attempt to merge pages that become less than half-full. Pages are de-allocated when they become empty. (Thus, only a simplified form of the B+ tree deletion algorithm is implemented.)
  13.  
  14. The BTreeFile class is derived from IndexFile, and scans are objects of the BTreeFileScan class. Pages are BTreePage objects. Lower levels (e.g. the Disk Space Manager) treat pages as Page objects; casting is used to obtain BTreePage objects.
  15.  
  16.  
  17.  
  18. Click here for the public interface.

Raw Paste


Login or Register to edit or fork this paste. It's free.