How to implement a string key in a B + Tree?

Many b + tree examples are implemented using an integer key, but I saw some other examples using both an integer key and a string key, I studied the b + tree base, but I don’t understand how the string key works?

+3
source share
2 answers

The string key may be a pointer to a string (very likely).

Or the key can be designed for most strings. 64 bits contain 8 byte strings and even 16 byte keys are not too funny.

The choice of key really depends on how you plan to use it.

0
source

B-Tree. , , [t, e, s, t]. . node . / , - . node ( ).

, . , .

, node , , + .

, , , , , () , 1000end .

1:10 ( !) 1: 4. ( , B +.

, .

( - ​​ ). , . , , .

. . , (8 ) + 4 * 6 = 32Bit β†’ -. , . , .

, , . , / , supperior ( , -).

+2

Source: https://habr.com/ru/post/1780330/


All Articles