- , A- Secondary Memory Multi way Search Trees : Node Structure : constant intm : . : - Most large data structures class B. Tree Node It 9 ¥ on disk storage Kno . of children reside nchild int ( / \ - organized in blocks BTreenodechildf.MIL/childrcn pages - - Latency keycm-DHkeys.Q.a.Q.a.k.IQ : High start - uptime key l amineismieisenoot was :c - - ⑧ . , ④ . --nan- ' . ftp.treesIC/7jThewiFhmn-i9egBitfeaesgfeiogrndera+m B' - Yaidosefsrayhrtreemereight L-umostllgnxr.where-lg.CH Ifeerehiapsthemost widely , ' ( see full notes for proof ) - Databases Example µ g m=5 : root ) - Numerous variants IT [ Each node has : ⇒ in :* ; m 13377 I of order B- Tree : b # . . - Root is leaf or has 32 children t.k.im#a::i:isia:eziveaiielD:s l4o H t- - root nodes have 1%7 tom 11 ! I ft t t ) Non f f b children [ null for leaves ] in 97 . ° ,
⇒ - , CF B. Tree restructuring ( Parent lost one key Rotation ( Adoption ) m=5 tell : . . . keykhild ) - key rotation ( Adoption ) 4 ¥ ITH - Anode has too few children - Generalizes I 2-3 restructure → I - I ( mm - splitting ( insertion ) - Does either immediate DID ' - Merging ⑥ f§ > fmkltl sibling have extra ? ( deletion ) - Adopt child from sibling t Ti T ats To - preferred . f) §g rotate keys T Ty To , T at , - when applicable . IB-treesIITELemma.ForallmzT.fm - . ⑧ III. ¥ 11 ' ⑥ m=g# → . . - S f ¥ .s 4 ¥ I ! ! ↳ - l 21mm funky E s m - ¥ -0 00*000001001%88888 " 1-1 ⇒ Resulting node is valid ! ! 451619g stiff + two ttt t 's ti . node merging . Node Splitting ft ' - Anode ha , too few " Ts Tt " " : - wms.spimt.int#m:.nomdei.YmsigcsgjLfmLTTfjm Promote * Parent . - After insertion , a node has children . - 1 too funky - Neither sibling has I many children - Mtl . . , em :trg ! b ¥ h:iY ¥ " " ' sibling to produce node Lemma : For all m > 2 , To Ty Ts t , it , L@withgmk7.D .fm/ilchild . smklsmtl.fm/4sm are valid node sizes ' " - m m ° ,
> - - Insertion : is :& :* : I " Ti i÷C÷ - I 'TmY ¥ Ym9 Hilden , n . " . ON 00.0%0.90 .÷÷÷i÷÷±÷:ii÷ , . T , I # Fy ' " . Ts Ty Ts → Else , split Ts Ts . → Promotes key Full ! I l{TesTIj → If root spliff ' . . addnewroot- ⇐ L - ÷ ¥¥ ÷÷÷÷÷ ¥¥ I, ⇒ Deletion :* : ms : I :::÷÷÷÷÷÷÷÷÷÷÷÷÷ ¥ . ¥ t EH → If sibling can give child Et ii. Kl ) → Key rotation Ill Ill ( h ooo ooo , TY ? 't give child ac.am Ts Tt T , to Tf Tz ' Ty - . .
Recommend
More recommend