{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

B tree indexes non leaf pages leaf pages leaf pages

Info icon This preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: ap file (with some free space on each page for future inserts). Overflow pages may be needed for inserts. (Thus, order of data recs is `close to’, but not iden6cal to, the sort order.) CLUSTERED Index entries direct search for data entries Data entries UNCLUSTERED Data entries (Index File) (Data file) Data Records Data Records Hash ­Based Indexes •  Good for equality selec6ons. •  Index is a collec6on of buckets. Bucket = primary page plus zero or more overflow pages. •  Hashing funcBon h: h(r) = bucket in which record r belongs. h looks at the search key fields of r. •  If Alterna6ve (1) is used, the buckets contain the data records; otherwise, they contain <key, rid> or <key, rid ­list> pairs. B+ Tree Indexes Non-leaf Pages Leaf Pages   Leaf pages contain data entries, and are chained (prev & next)   Non-leaf pages contain index entries and direct searches: index entry P0 K1 P1 K2 P2 K m Pm Example B+ Tree Root 17 Entries < 17 5 2* 3* Entries >= 17 27 13 5* 7* 8* 14* 16* 22* 24* 30 27* 29* 33* 34* 38* 39* •  Find 28*? 29*? All > 15* and < 30* •  Insert/delete: Find data entry in leaf, then change it. Need to adjust parent some6mes. –  And change some6mes bubbles up the tree Cost Model for Our Analysis W...
View Full 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