I study B + trees for indexing, and I try to understand more than just remembering the structure. As far as I understand, the internal nodes of the B + tree form an index on the leaves, and the leaves contain pointers to where the data is stored on disk. Correctly?
No, the index is formed by internal nodes (non-leaves). Depending on the implementation, leaves may contain key / value pairs or key / pointer pairs for value pairs. For example, the database index uses the latter if it is not an IOT (indexed index table), in which case the values โโare inserted into the sheets. This mainly depends on whether the value is insanely large on the key.
Then how are the searches performed?
, node ( ), node N N + 1 . S0 S1 , S0 <= K < S1 ( K - , ), node.
, () node, .
B + , , B + ?
- . , cookie B + Trees - / / . , cookie, , .
- : . , B + , , .
- B + / . , (, ).
, , - ?
, , , , .
B +, ?
: .
: B + / . , ( ) (CPU Cache โ RAM โ Disk), B + Tree , , . ( ).