1 / 11

HTPR*-Tree Detail Design

HTPR*-Tree Detail Design. IIS Lab ( 이병기 교수님 ) 컴공 19981234 김승준. Contents. Insert Algorithm Choose path Algorithm Node Insert Algorithm Key Split and Version Split Delete Algorithm Class Diagram. Insert(Entry e). let R be the associated with current timestamp

aine
Download Presentation

HTPR*-Tree Detail Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HTPR*-Tree Detail Design IIS Lab (이병기 교수님) 컴공 19981234 김승준

  2. Contents • Insert Algorithm • Choose path Algorithm • Node Insert Algorithm • Key Split and Version Split • Delete Algorithm • Class Diagram

  3. Insert(Entry e) • let R be the associated with current timestamp • re-inserted_i = false for all levels 1<=i<=h-1 (h is tree height) • invoke choose path (R, e) to find leaf node N to insert e • invoke node insert (N, e) • for each entry e’ in the L_reinserted • invoke choose path to find the leaf node N to insert e’ • Invoke node insert (N, e)

  4. Choose path • example

  5. Choose path (Node N, Entry e) • if N is a leaf, return N • initialize QP (priority queue) • let S = { all the live entries in N } • calculate cost degradation of all entries of S to QP • explore smallest cost degradation until the leaf level • when reached the leaf level , save smallest cost degradation entry to x and node to X • if x.t_start < current timestamp and x.MBR or x.VBR has changed, • insert a copy x’ of x into node N where x belongs and set x.t_end to the current time (if x.t_start == x.t_end then delete x) • set x as parent of x and go to G • return X

  6. Version split • example

  7. Strong version overflow and Key split • example

  8. Node insert(Node N, Entry e) • if N is a leaf node • enter the information of e • If N overflows • If all entries in N were inserted at the current timestamp • If re-inserted_0 = false // no re-insertion at leaf level yet • Invoke pick worst to select a set S_worst of entries • Remove entries in S_worst from N; add them to L_reinsert • re-inserted_0=true • Else • Invoke key split to split N into itself and N’ • Else // version split • create a new node N_1 • For each live entry e in N • Duplicate e to e’ and enter e’ into N_1 • If e was inserted at the current timestamp • Delete e physically • Else • Modify the end time of e and the start time of e’ to the current time • If N_1 strong version overflows • Invoke key split to split N into itself and N’ • Let P be the parent of N • Node insert(P, null) or node insert(P, N’) if N has been split • Else // if N is a non-leaf node • Similar to line B-T except that (i) the MBR/VBR of the affected child node is adjusted, and (ii) in line E, H replace re-inserted_0 with re-inserted_i where I is the level of N

  9. Delete • example

  10. Delete(Entry e) • Invoke find leaf with adjustment to locate the node N the contains e • Delete e from N and invoke treat underflow if N underflow • Ascend to the root and for each node N_i in the path • If N_i overflows invoke treat overflow • If N_i is not the root and underflows, invoke treat underflow • If the root has only one entry but not a data page • Make the child of the entry the new root • Update the most recent entry in the root table • If the root incurs a version split • Insert a new entry in the root table (make new root)

  11. Class Diagram

More Related