2 with recombined pages the index page will be

Info icon This preview shows pages 45–48. Sign up to view the full content.

View Full Document Right Arrow Icon
2. With recombined pages, the index page will be reduced by one key. Hence, it will also fall below the fill factor. Thus, we must combine index pages. 3. 60 appears as the only key in the root index page. Obviously, it will be removed with the deletion. The following figure shows the B + tree after the deletion of 60. Notice that the tree contains a single index page. B + Tree File Organization The performance of index-sequential file organization degrades as the file grows. With growth, an increasing percentage of index records and actual records become out of order and are stored in overflow blocks. We solve the degradation of index lookup by using B + tree indices on the file. We solve the degradation problem of storing the actual records by using the leaf level of B + tree to organize the blocks containing the actual records. head2right In a B + tree file organization, the leaf nodes of the tree store records instead of storing pointers to records. head2right Since records are usually larger than pointers, the maximum number of records that can be stored in a leaf node is less than the maximum number of Figure: B + tree file organization.
Image of page 45

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

View Full Document Right Arrow Icon
42 pointers in a non-leaf node. head2right However, the leaf nodes are still required to be at least half full. head2right Insertion and deletion from a B + tree file organization are handled in the same way as that in a B + tree index. head2right When a B + tree is used for file organization, space utilization is particularly important. We can improve the space utilization by involving more sibling nodes in redistribution during splits and merges. This technique is called rotation . As an example, consider the B + tree before the addition of the record containing a key of 70. As previously stated, this record belongs in the leaf node containing 50 55 60 65. Notice that this node is full, but its left sibling is not: Using rotation we shift the record with the lowest key to its sibling. Since this key appeared in the index page we also modify the index page. The new B + tree appears in the following figure: B-Tree Index head2right B-tree indices are almost similar to B + tree indices, but B-tree eliminates the redundant storage of search key values. In B + tree, some search key values appear twice. A corresponding B-tree allows search key values to appear only once. Thus we can store the index in less space. head2right Search keys in non-leaf nodes appear nowhere else in the B-tree; an additional pointer field for each search key in a non-leaf node must be included. head2right For non-leaf node, pointers B i are the bucket or file record pointers. Figure: B + tree (above) and the corresponding B-tree (below).
Image of page 46
43 Advantages of B-Tree 1. May use less tree nodes than a corresponding B + tree. 2. Sometimes it is possible to find the desired value before reaching a leaf node.
Image of page 47

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

View Full Document Right Arrow Icon
Image of page 48
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern